Advertisement
Guest User

Untitled

a guest
Apr 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. <?php
  2. if($nour == "Noureddyne")
  3. {
  4. ?>
  5. <?
  6.  
  7. date_default_timezone_set('Africa/Lagos');
  8.  
  9. $views="0";
  10. $date = date("d/m/y h:i:s");
  11. $ip = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']);
  12.  
  13. $p_img = $_POST['t_img'];
  14. $p_name = $_POST['t_name'];
  15. $p_content = $_POST['t_post'];
  16. $p_label = $_POST['t_label'];
  17. $p_keywords = $_POST['t_keywords'];
  18. $p_desc = $_POST['t_desc'];
  19. $p_label_name = $_POST['label_name'];
  20.  
  21. if(isset($_POST['newpost'])){
  22. if(empty($p_img)OR empty($p_name) OR empty($p_keywords) OR empty($p_desc)){
  23. echo "<div class='error'>Sorry Problem,Please Try Again!</div>";
  24. }else{
  25. $updatesql = mysql_query ("INSERT INTO posts (t_img,t_name,t_post,t_label,t_keywords,t_desc,t_date,t_ip,t_views,label_name) VALUES ('".$p_img."','".$p_name."','".$p_content."','".$p_label."','".$p_keywords."','".$p_desc."',NOW(),'".$ip."','".$views."','".$p_label_name."')");
  26. echo"<div class='ok'>The Article Was added successfully</div>";
  27. echo"<meta http-equiv='refresh' content='1; url=?admin=All_articles'/>";
  28. }
  29. }
  30. ?>
  31. <form action="?admin=new-article" method="POST">
  32. <br>
  33. <center>
  34. <div style="width: 90%;">
  35.  
  36. <input name="t_img" type="text" placeholder="image Of The Article...." class="box01">
  37. <br>
  38. <br>
  39. <input name="t_name" onkeyup="this.value = this.value.replace(/[']/g, '')" type="text" class="box01" placeholder="Title of The Article....">
  40. <br>
  41. <br>
  42. <textarea id="editor1" name="t_post" style="width:100%;">
  43. Start writing Your Article from here :) ....
  44. </textarea>
  45. <script type="text/javascript">
  46. CKEDITOR.replace( 'editor1' );
  47. </script>
  48. <br>
  49. <textarea onkeyup="this.value = this.value.replace(/[']/g, '')" style="width: 100%;min-height: 90px;margin-left: 0px;margin-right: 0px;padding: 10px;outline: none;" name="t_keywords" placeholder="Keywords For this Article (xxxx,xxxx,xxxxx,xxxxxx,xxxxxx,xxxx)"></textarea>
  50. <br>
  51. <br>
  52. <textarea onkeyup="this.value = this.value.replace(/[']/g, '')" style="width: 100%;min-height: 90px;margin-left: 0px;margin-right: 0px;padding: 10px;outline: none;" name="t_desc" placeholder="short description For This Article (xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxx)"></textarea>
  53. <br>
  54. <br>
  55. <label>
  56. <select onchange="myFunction(this)" name="t_label" id="purpose" style="font-family:verdana;padding: 10px;outline: none;border-radius: 5px;">
  57. <option>Choose Label For your Article...</option>
  58. <?
  59. $sqllom = mysql_query("SELECT * FROM labels");
  60. while($sqlsorry = mysql_fetch_object($sqllom)){
  61. echo"<option value='".$sqlsorry->cat_id."'>".$sqlsorry->cat_name."</option>";
  62. }
  63. ?>
  64. </select>
  65. </label>
  66. <br>
  67. <textarea name="label_name" id="demo" style="display:none;"></textarea>
  68. <script>
  69. function myFunction(selTag) {
  70. var x = selTag.options[selTag.selectedIndex].text;
  71. document.getElementById("demo").innerHTML = x;
  72. }
  73. </script>
  74. <br>
  75. <center>
  76. <br>
  77. <input name="newpost" type="submit" class="myButton" value="Add Now">
  78. </center>
  79. <br>
  80. </center>
  81. </form>
  82.  
  83. <?php
  84. }
  85. else
  86. {
  87. ?>
  88. <!-- This Message Not For You -->
  89. <center>
  90. i Catched You dirty human! What are you doing here, Fuck You and Go Away you are a dirty Men
  91. <br>
  92. <br>
  93. ./ Noureddyne Boumadyen
  94. </center>
  95. <!-- This Message For Hackers ^_^-->
  96. <?php
  97. }
  98. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement