Guest User

Untitled

a guest
Feb 19th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. <?php
  2. /*---------------------------------------------------+
  3. | PHP-Fusion 7 Content Management System
  4. +----------------------------------------------------+
  5. | Copyright ɠ2002 - 2008 Nick Jones
  6. | http://www.php-fusion.co.uk/
  7. +----------------------------------------------------+
  8. | Released under the terms & conditions of v2 of the
  9. | GNU General Public License. For details refer to
  10. | the included gpl.txt file or visit http://gnu.org
  11. +----------------------------------------------------+
  12. | For PHP-Fusion 7.02.xx
  13. +----------------------------------------------------*/
  14.  
  15. require_once "maincore.php";
  16. require_once THEMES."templates/header.php";
  17.  
  18. add_to_title(" - Skelbimo pateikimas");
  19.  
  20. if (!iGUEST) {
  21.  
  22. if(isset($_POST['siusti'])){
  23. $title = stripslash($_POST['title']);
  24. if ($title == "") {
  25. $error .= " <span class='alt'>Kur tavo tile?</span><br />\n";
  26. }
  27. $descr = htmlspecialchars($_POST['descr']);
  28. $auth = htmlspecialchars($_POST['auth']);
  29. $price = htmlspecialchars($_POST['price']);
  30. $work = ($_POST['work']);
  31. $skype = ($_POST['skype']);
  32. $email = ($_POST['email']);
  33. $cat = isnum($_POST['cat']) ? $_POST['cat'] : "0";
  34. $keliam = dbquery("INSERT INTO ".$db_prefix."themes(title,descr,auth,price,work,skype,email,cat) VALUES ('".$title."', '".$descr."','".$auth."','".$price."','".$work."','".$skype."','".$email."','".$cat."')");
  35.  
  36. opentable("Skelbimo pateikimas");
  37. echo "<div style='text-align:center'><br />\nAčiū, kad pateikėte skelbimą<br /><br />\n";
  38. echo "<a href='submit_theme.php'>Pateikti kitą skelbimą</a><br /><br />\n";
  39. echo "<a href='index.php'>Grįžti į ".$settings['sitename']."</a><br /><br />\n</div>\n";
  40. closetable();
  41.  
  42. } else {
  43. $opts = "";
  44. $result = dbquery("SELECT themes_cat_id, themes_cat_name FROM ".$db_prefix."themes_cats WHERE ".groupaccess("themes_cat_access")." ORDER BY themes_cat_name");
  45. if (dbrows($result) != 0) {
  46. while ($data = dbarray($result)) {
  47. $opts .= "<option value='".$data['themes_cat_id']."'>".$data['themes_cat_name']."</option>\n";
  48. }
  49. echo "<form method='post'>\n";
  50. echo "<table cellpadding='0' cellspacing='0' class='center' style='width:500px;'>\n<tr>\n";
  51. echo "<td class='tbl'>Pavadinimas<span style='color:#ff0000'>*</span></td>\n";
  52. echo "<td class='tbl'><input type='text' name='title' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
  53. echo "</tr>\n<tr>\n";
  54. echo "<td class='tbl1' style='width:80px; vertical-align:top;'>Aprašymas</td>\n";
  55. echo "<td class='tbl1'><textarea name='descr' cols='60' rows='5' class='textbox' style='width:380px;'></textarea></td>\n";
  56. echo "</tr>\n<tr>\n";
  57.  
  58.  
  59.  
  60.  
  61.  
  62. echo "<tr>\n<td class='tbl1'>Kategorija<span style='color:#ff0000'>*</span></td>\n";
  63. echo "<td class='tbl1'><select name='cat' class='textbox'>\n".$opts."</select></td>\n";
  64. echo "</tr>\n<tr>\n";
  65.  
  66.  
  67. echo "<td class='tbl1' style='width:80px;'>Autorius<span style='color:#ff0000'>*</span></td>\n";
  68. echo "<td class='tbl1'><input type='text' name='auth' class='textbox' style='width:380px;' /></td>\n";
  69. echo "</tr>\n<tr>\n";
  70. echo "<td class='tbl1' style='width:80px;'>Kaina<span style='color:#ff0000'>*</span></td>\n";
  71. echo "<td class='tbl1'><input type='text' name='price' class='textbox' style='width:380px;' /></td>\n";
  72. echo "</tr>\n<tr>\n";
  73. echo "<td class='tbl1' style='width:80px;'>Darbo rūšis<span style='color:#ff0000'>*</span></td>\n";
  74. echo "<td class='tbl1'><input type='radio' name='work' class='' value='PSD' style='width:20px;' />.PSD";
  75. echo "<input type='radio' name='work' class='' value='CODE' style='width:20px;' />KODAS</td>\n";
  76. echo "</tr>\n<tr>\n";
  77. echo "<td class='tbl1' style='width:80px;'>Kontaktai<span style='color:#ff0000'>*</span></td>\n";
  78. echo "<td class='tbl1'>Skype <input type='text' name='skype' class='textbox' style='width:140px;' /><span style='padding-left: 20px;'></span>";
  79. echo "El'paštas <input type='text' name='email' class='textbox' style='width:140px;' /></td>\n";
  80. echo "</tr>\n<tr>\n";
  81. echo "<td align='center' colspan='2' class='tbl'><br />\n";
  82. echo "<input type='submit' name='siusti' value='Pateikti' class='button' />\n</td>\n";
  83. echo "</tr>\n</table>\n</form>\n";
  84. } else {
  85.  
  86. echo "MYSQL Error";
  87. }
  88.  
  89.  
  90. }
  91. }
  92.  
  93. require_once THEMES."templates/footer.php";
  94. ?>
Advertisement
Add Comment
Please, Sign In to add comment