Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- //Configuration For CMS
- $db['host']="localhost"; // Set HOSTNAME
- $db['name']="test"; // Set database name
- $db['user']="root"; // Set database user
- $db['pass']="19941994"; // Set database pass
- $connect=@mysql_connect($db['host'],$db['user'],$db['pass']);
- $DB=@mysql_select_db($db['name'],$connect);
- //Made In Syria
- function gp($length,$password,$type)
- {
- if($type=='group' or $type=='user')
- $possible = "012346789";
- else
- $possible = "012346789abcdefghijklmnopqrstuvwxyz";
- $maxlength = strlen($possible);
- if ($length > $maxlength) {
- $length = $maxlength;
- }
- $i = 0;
- while ($i < $length) {
- $char = substr($possible, mt_rand(0, $maxlength-1), 1);
- if (!strstr($password, $char)) {
- $password .= $char;
- $i++;
- }
- }
- return $password;
- }
- $query = @mysql_query("SELECT * FROM activate");
- $rows = @mysql_fetch_array($query);
- $group = $rows['orderss'] + 1;
- echo "
- <center><table width=400 border=1>
- <form method=POST action=''>
- <tr>
- <td>Num : </td>
- <td><input type=text size=15 name='num'></td>
- <td>$group</td>
- <input type='hidden' value='".$group."' name='group'>
- </tr>
- <tr>
- <td colspan=3><center><input value='Generate' type=submit name='generate'></center></td>
- </tr>
- </form>
- </table></center>
- ";
- if($_POST['generate']){
- for($i=0;$i<$_POST['num'];$i++){
- $username = gp(12,"EAV-","user");
- $password = gp(10,"","");
- $group = $_POST['group'];
- $Iquery=@mysql_query("INSERT INTO `activate` (`activate_id` ,`name` ,`pass_code` ,`orderss`) VALUES ('','".$username."','".$password."','".$group."')");
- if(!$Iquery)
- echo "Success !";
- echo "<META HTTP-EQUIV='refresh' CONTENT='0; URL=test.php'>";
- }
- }
- ?>
Add Comment
Please, Sign In to add comment