Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<div class="container col-md-6">
2
	<h2 class="public_head">
3
		<i class="fas fa-user-tie"></i>
4
		<?php echo $spText['login']['Create New Account']?>
5
	</h2>
6
	<div class="public_form">
7
	<form name="loginForm" method="post" action="<?php echo SP_WEBPATH?>/register.php">
8
        <input type="hidden" name="sec" value="register">
9
		<?php
10
		if (!empty($_GET['failed'])) {
11
			showErrorMsg($spTextSubscription['internal-error-payment'], false);
12
		}
13
 
14
		if (!empty($_GET['cancel'])) {
15
			showErrorMsg($spTextSubscription["Your transaction cancelled"], false);
16
		}
17
		?>
18
 
19
		<?php
20
		// if subscription plugin is active
21
		if ($subscriptionActive & !empty($userTypeList)){
22
			?>
23
			<div class="form-group">
24
				<label for="utype_id"><?php echo $spTextSubscription['Subscription']?>:</label>
25
				<select name="utype_id" class="form-control" id="utype_id">
26
					<?php
27
					foreach ($userTypeList as $userTypeInfo) {
28
						$selected = ($post['utype_id'] == $userTypeInfo['id']) ? "selected" : "";
29
						$typeLabel = ucfirst($userTypeInfo['user_type']) . " - ";
30
 
31
						// if user type have price
32
						if ($userTypeInfo['price'] > 0) {
33
							$typeLabel .= $currencyList[SP_PAYMENT_CURRENCY]['symbol'] . $userTypeInfo['price'] . "/" . $spText['label']['Monthly'];
34
						} else {
35
							$typeLabel .= $spText['label']['Free'];
36
						}
37
						?>
38
						<option value="<?php echo $userTypeInfo['id']?>" <?php echo $selected;?>><?php echo $typeLabel?></option>
39
						<?php
40
					}
41
					?>
42
				</select>
43
				<?php echo $errMsg['utype_id'] ? "<br>". $errMsg['utype_id'] : $errMsg['utype_id']?>
44
				<div class="form-group" style="margin-top: 4px;">
45
					<a href="<?php echo SP_WEBPATH . "/register.php?sec=pricing"; ?>"><?php echo $spTextSubscription['Plans and Pricing']?> &gt;&gt;</a>
46
				</div>
47
			</div>
48
			<div class="form-group">
49
				<label for="quantity"><?php echo $spTextSubscription['Term']?>:</label>
50
				<select name="quantity" class="form-control" id="quantity">
51
					<?php
52
					for ($i = 1; $i <= 24; $i++) {
53
						$qty_label = ($i == 1) ? $spText['label']['Month'] : $spText['label']['Months'];
54
						?>
55
						<option value="<?php echo $i;?>"><?php echo $i . " $qty_label";?></option>
56
						<?php
57
					}
58
					?>
59
				</select>
60
			</div>
61
			<?php $pgDisplay = count($pgList) > 1 ? "" : "display:none;";?>
62
			<div class="form-group" style="<?php echo $pgDisplay?>">
63
				<label for="pg_id"><?php echo $spTextSubscription['Payment Method']?>:</label>
64
				<select name="pg_id" class="form-control" id="pg_id">
65
					<?php
66
					foreach ($pgList as $pgInfo) {
67
						$checked = ($defaultPgId == $pgInfo['id']) ? "selected" : ""
68
						?>
69
						<option value="<?php echo $pgInfo['id']?>" <?php echo $checked; ?> ><?php echo $pgInfo['name']; ?></option>
70
						<?php
71
					}
72
					?>
73
				</select>
74
				<?php echo $errMsg['pg_id']?>
75
			</div>
76
			<?php
77
		} else {
78
			?>
79
			<input type="hidden" name="utype_id" value="<?php echo $defaultUserTypeId; ?>">
80
		<?php }	?>
81
 
82
			<div class="form-group">
83
            	<label><?php echo $spText['login']['Username']?>:</label>
84
                <input type="text" name="userName" value="<?php echo $post['userName']?>" class="form-control" required="required">
85
 				<?php echo $errMsg['userName']?>
86
			</div>
87
			<div class="form-group">
88
            	<label><?php echo $spText['login']['Password']?>:</label>
89
                <input type="password" name="password" value="" class="form-control" required="required">
90
                <?php echo $errMsg['password']?>
91
			</div>
92
            <div class="form-group">
93
            	<label><?php echo $spText['login']['Confirm Password']?>:</label>
94
				<input type="password" name="confirmPassword" value="" class="form-control" required="required">
95
			</div>
96
			<div class="form-group">
97
            	<label><?php echo $spText['login']['First Name']?>:</label>
98
                <input type="text" name="firstName" value="<?php echo $post['firstName']?>" class="form-control" required="required">
99
                <?php echo $errMsg['firstName']?>
100
			</div>
101
			<div class="form-group">
102
            	<label><?php echo $spText['login']['Last Name']?>:</label>
103
                <input type="text" name="lastName" value="<?php echo $post['lastName']?>" class="form-control" required="required">
104
                <?php echo $errMsg['lastName']?>
105
			</div>
106
            <div class="form-group">
107
				<label><?php echo $spText['login']['Email']?>:</label>
108
                <input type="email" name="email" value="<?php echo $post['email']?>" class="form-control" required="required">
109
                <?php echo $errMsg['email']?>
110
			</div>
111
			<div class="form-group">
112
            	<label><?php echo $spText['login']['Enter the code as it is shown']?>:</label>
113
				<div class="form-group">
114
                	<img src="<?php echo SP_WEBPATH?>/visual-captcha.php">
115
				</div>
116
				<input type="text" name="code" value="<?php echo $post['code']?>" class="form-control" required="required">
117
				<?php echo $errMsg['code']?>
118
			</div>
119
			<a href="<?php echo SP_WEBPATH?>/login.php" class="btn btn-secondary" role="button"><?php echo $spText['button']['Cancel']?></a>
120
			<button name="register" type="submit" class="btn btn-primary"><?php echo $spText['login']['Create my account']?></button>
121
	</form>
122
	</div>
123
</div>