Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.85 KB | None | 0 0
  1. <?
  2. //##########################################################################
  3. //#            AURORAGPT Script Copyright owned by Mike Pratt              #
  4. //#        AURORA SDR Script Copyright owned by Noroc Marius-Mihai         #
  5. //#                        ALL RIGHTS RESERVED 2007-2017                   #
  6. //#                                                                        #
  7. //#        Any illegal use of this script is strictly prohibited unless    #
  8. //#        permission is given by the owner of this script.  To sell       #
  9. //#        this script you must have a resellers license. Your site        #
  10. //#        must also use a unique encrypted license key for your           #
  11. //#        site. Your site must also have site_info module and             #
  12. //#        key.php file must be in the script unedited. Otherwise          #
  13. //#        it will be considered as unlicensed and can be shut down        #
  14. //#        legally by Illusive Web Services. By using AuroraGPT            #
  15. //#        script you agree not to copy infringe any of the coding         #
  16. //#        and or create a clone version is also copy infringement         #
  17. //#        and will be considered just that and legal action will be       #
  18. //#        taken if neccessary.                                            #
  19. //########################################################################//
  20. $includes[title]="Manage Code Rotator";
  21. $newcod = $_POST['newcod'];
  22. if($action == "add") {
  23.     $Db1->query("INSERT INTO code_rotator SET
  24.         title='".addslashes($title)."',
  25.         code='$newcod',
  26.         `limit`='$limit',
  27.         weight='$weight'
  28.     ");
  29.     $Db1->sql_close();
  30.     header("Location: admin.php?view=admin&ac=code_rotator&".$url_variables."");
  31. }
  32. $newcob = $_POST['newcob'];
  33. if($action == "update") {
  34.     for($x=0; $x<count($weight); $x++) {
  35.         if($delete[$x] == 1) {
  36.             $Db1->query("DELETE FROM code_rotator WHERE id='".$codeid[$x]."'");
  37.         }
  38.         else {
  39.             $Db1->query("UPDATE code_rotator SET
  40.                 weight='".$weight[$x]."',
  41.                 `limit`='".$limit[$x]."',
  42.                 code='$newcob',
  43.                 title='".addslashes($title[$x])."' WHERE id='".$codeid[$x]."'");
  44.         }
  45.     }
  46.     $Db1->sql_close();
  47.     header("Location: admin.php?view=admin&ac=code_rotator&".$url_variables."");
  48. }
  49.  
  50. $sql=$Db1->query("SELECT * FROM code_rotator ORDER BY dsub");
  51. for($x=0; $code = $Db1->fetch_array($sql); $x++) {
  52.     $list.="
  53.     <input type=\"hidden\" name=\"codeid[$x]\" value=\"$code[id]\">
  54.     <table width=\"450px\">
  55.         <tr>
  56.             <td width=\"250px\">Title:</td>
  57.             <td><input type=\"text\" name=\"title[$x]\" size=35 value=\"".htmlentities(stripslashes($code[title]))."\"></b></td>
  58.         </tr>
  59.         <tr>
  60.             <td width=\"250px\"><font color=\"darkred\">Delete this Ad:</font></td>
  61.             <td><input type=\"checkbox\" name=\"delete[$x]\" value=\"1\"></td>
  62.         </tr>
  63.         <tr>
  64.             <td width=\"250px\">Credits Assigned:</td>
  65.             <td><input type=\"text\" name=\"limit[$x]\" size=5 value=\"$code[limit]\"></td>
  66.         </tr>
  67.         <tr>
  68.             <td width=\"250px\">Hits Received:</td>
  69.             <td>$code[tcount]</td>
  70.         </tr>
  71.         <tr>
  72.             <td width=\"250px\">Ad Weight:</td>
  73.             <td><input type=\"text\" name=\"weight[$x]\" size=3 value=\"$code[weight]\"></td>
  74.         </tr>
  75.         <tr>
  76.             <td width=\"250px\">Code:</td>
  77.         </tr>
  78.     </table>
  79.     <table>
  80.         <tr>
  81.             <td><textarea cols=50 rows=3 name=\"newcob\">".stripslashes($code[code])."</textarea></td>
  82.         </tr>
  83.         <tr>
  84.             <td colspan=2 height=1 bgcolor=\"darkblue\"></td>
  85.         </tr>
  86.     </table>
  87.    
  88.     ";
  89. }
  90.  
  91. $includes[content]="
  92. <div align=\"center\">
  93. <table width=\"450px\">
  94.     <tr>
  95.             <td width=\"450\" align=\"center\";  bgcolor=\"d0fb8f\"><b><font style=\"font-size: 12pt; color: darkblue\">Create a New Code Rotator Ad</font></b></td>
  96.     </tr>
  97. </table>
  98. <form action=\"admin.php?view=admin&ac=code_rotator&action=add&".$url_variables."\" method=\"post\">
  99. <table width=\"450px\">
  100.         <tr>
  101.             <td width=\"250px\">Title: </td>
  102.             <td><input type=\"text\" name=\"title\" size=\"35\"></td>
  103.         </tr>
  104.         <tr>
  105.             <td width=\"250px\">Credits: </td>
  106.             <td><input type=\"text\" name=\"limit\" size=8 value=\"0\"></td>
  107.         </tr>
  108.         <tr>
  109.             <td width=\"250px\">Ad Weight: </td>
  110.             <td><input type=\"text\" name=\"weight\" size=8 value=\"1\"></td>
  111.         </tr>
  112.         <tr>
  113.             <td width=\"250px\">Code: </td>
  114.         </tr>
  115. </table>
  116. <table>
  117.         <tr>
  118.             <td colspan=2><textarea name=\"newcod\" cols=50 rows=3></textarea></td>
  119.         </tr>
  120.         <tr>
  121.             <td colspan=2 align=\"center\"><input type=\"submit\" value=\"Add Code\"></td>
  122.         </tr>
  123. </table>
  124. </form>
  125. <table width=\"450px\">
  126.     <tr>
  127.             <td width=\"450\" align=\"center\";  bgcolor=\"d0fb8f\"><b><font style=\"font-size: 12pt; color: darkblue\">Current Code Rotator Ads</font></b></td>
  128.     </tr>
  129. </table>
  130. <form action=\"admin.php?view=admin&ac=code_rotator&action=update&".$url_variables."\" method=\"post\">
  131.  
  132.     $list
  133. <table width=\"445px\">
  134.     <tr>
  135.         <td align=\"center\"><input type=\"submit\" value=\"Save\"></td>
  136.     </tr>
  137. </table>
  138.  
  139. </form>
  140.  
  141. </div>
  142. ";
  143.  
  144. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement