Changeset 161493
- Timestamp:
- 10/08/2009 04:46:40 AM (16 years ago)
- Location:
- admangler/trunk
- Files:
-
- 1 added
- 3 edited
-
adMangler.class.php (modified) (3 diffs)
-
panel/login.php (modified) (1 diff)
-
panel/register.php (modified) (1 diff)
-
panel/retrieve.php (added)
Legend:
- Unmodified
- Added
- Removed
-
admangler/trunk/adMangler.class.php
r161460 r161493 8 8 $this->adsTable = $wpdb->prefix."AdMangler_ads"; 9 9 $this->settingsTable = $wpdb->prefix."AdMangler_settings"; 10 $this->usersTable = $wpdb->prefix."AdMangler_users"; 10 11 } // End function AdMangler 11 12 … … 48 49 username VARCHAR(256) COLLATE utf8_bin NOT NULL, 49 50 password VARCHAR(256) COLLATE utf8_bin NOT NULL, 50 credit FLOAT(10,2) NOT NULL,51 credits FLOAT(10,2), 51 52 UNIQUE KEY id (id), 52 53 PRIMARY KEY username (username) … … 62 63 foreach($sql as $temp) 63 64 dbDelta($temp); 64 add_option('AdMangler_db_version', $db_version); 65 if (get_option('AdMangler_db_version')) 66 update_option('AdMangler_db_version', $db_version); 67 else 68 add_option('AdMangler_db_version', $db_version); 65 69 } 66 70 -
admangler/trunk/panel/login.php
r161460 r161493 1 <form action="?action=login" method="post"> 1 <?php 2 global $wpdb,$adMangler; 3 $wpdb->hide_errors(); 4 if (isset($_POST['username']) && isset($_POST['password'])) 5 { 6 $sql = "SELECT id FROM $adMangler->usersTable WHERE username='".$_POST['username']."' AND password='".sha1($_POST['password'])."'"; 7 $result = $wpdb->query($wpdb->prepare($sql)); 8 if ($result) 9 { 10 $login = $wpdb->get_row($result); 11 if (1 == $wpdb->num_rows) 12 { 13 echo "Found You!"; 14 } 15 } 16 } 17 ?> 18 <form action="?action=login" method="POST"> 2 19 <div><label>Username:</label></div> 3 <div><input type=" username" /></div>20 <div><input type="text" name="username" /></div> 4 21 <div> </div> 5 22 <div><label>Password:</label></div> 6 <div><input type="password" /></div>23 <div><input type="password" name="password" /></div> 7 24 <div><button type="submit">GO!</button></div> 8 25 <div> </div> -
admangler/trunk/panel/register.php
r161460 r161493 73 73 } 74 74 ?> 75 75 <style type="text/css"> 76 dl { clear:both; padding:3px; } 77 dt { float:left; width:125px; text-align:right; padding:0px 5px; margin:0px; } 78 dd { float:left; text-align:left; padding:0px; margin:0px; } 79 </style> 80 <h3>Register</h3> 76 81 <form action="" method="post"> 77 <label>Username:</label> 78 <input type="username" /> 79 <label>Password:</label> 80 <input type="password" /> 81 <label>Password Again:</label> 82 <input type="password" /> 83 <label>Email Address:</label> 84 <input type="text" /> 82 <dl> 83 <dt><label>Username:</label></dt> 84 <dd><input type="username" /></dd> 85 </dl> 86 <dl> 87 <dt><label>Password:</label></dt> 88 <dd><input type="password" /></dd> 89 </dl> 90 <dl> 91 <dt><label>Password Again:</label></dt> 92 <dd><input type="password" /></dd> 93 </dl> 94 <dl> 95 <dt><label>Email Address:</label></dt> 96 <dd><input type="text" /></dd> 97 </dl> 98 <dl> 99 <dt><label> </label></dt> 100 <dd><button type="submit">Register</button></dd> 101 </dl> 85 102 </form>
Note: See TracChangeset
for help on using the changeset viewer.