Wyciokazz

Untitled

Feb 19th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.72 KB | None | 0 0
  1.  if (!iGUEST) {
  2.  
  3.   if(isset($_POST['siusti'])){
  4.    $title = htmlspecialchars($_POST['title']);
  5.    $descr = htmlspecialchars($_POST['descr']);
  6.    $auth = htmlspecialchars($_POST['auth']);
  7.    $price = htmlspecialchars($_POST['price']);
  8.    $work = ($_POST['work']);
  9.    $skype = ($_POST['skype']);
  10.    $email = ($_POST['email']);
  11.    $cat = isnum($_POST['cat']) ? $_POST['cat'] : "0";
  12.    $keliam = dbquery("INSERT INTO ".$db_prefix."themes(title,descr,auth,price,work,skype,email) VALUES ('".$title."', '".$descr."','".$auth."','".$price."','".$work."','".$skype."','".$email."')");
  13.    
  14.    opentable("Skelbimo pateikimas");
  15.    echo "<div style='text-align:center'><br />\nAčiū, kad pateikėte skelbimą<br /><br />\n";
  16.    echo "<a href='submit_theme.php'>Pateikti kitą skelbimą</a><br /><br />\n";
  17.    echo "<a href='index.php'>Grįžti į ".$settings['sitename']."</a><br /><br />\n</div>\n";
  18.    closetable();
  19.  
  20. } else {
  21. $opts = "";
  22. $result = dbquery("SELECT themes_cat_id, themes_cat_name FROM ".$db_prefix."themes_cats WHERE ".groupaccess("themes_cat_access")." ORDER BY themes_cat_name");
  23.       if (dbrows($result) != 0) {
  24.          while ($data = dbarray($result)) {        
  25.          $opts .= "<option value='".$data['themes_cat_id']."'>".$data['themes_cat_name']."</option>\n";
  26.          }
  27.          echo "<form method='post'>\n";
  28.          echo "<table cellpadding='0' cellspacing='0' class='center' style='width:500px;'>\n<tr>\n";
  29.          echo "<td class='tbl'>Pavadinimas<span style='color:#ff0000'>*</span></td>\n";
  30.          echo "<td class='tbl'><input type='text' name='title' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
  31.          echo "</tr>\n<tr>\n";
  32.          echo "<td class='tbl1' style='width:80px; vertical-align:top;'>Aprašymas</td>\n";
  33.          echo "<td class='tbl1'><textarea name='descr' cols='60' rows='5' class='textbox' style='width:380px;'></textarea></td>\n";
  34.          echo "</tr>\n<tr>\n";
  35.          
  36.      
  37.          
  38.          
  39.          
  40.          echo "<tr>\n<td class='tbl1'>Kategorija<span style='color:#ff0000'>*</span></td>\n";
  41.          echo "<td class='tbl1'><select name='cat' class='textbox'>\n".$opts."</select></td>\n";
  42.          echo "</tr>\n<tr>\n";
  43.          
  44.          
  45.          echo "<td class='tbl1' style='width:80px;'>Autorius<span style='color:#ff0000'>*</span></td>\n";
  46.          echo "<td class='tbl1'><input type='text' name='auth' class='textbox' style='width:380px;' /></td>\n";
  47.          echo "</tr>\n<tr>\n";
  48.          echo "<td class='tbl1' style='width:80px;'>Kaina<span style='color:#ff0000'>*</span></td>\n";
  49.          echo "<td class='tbl1'><input type='text' name='price' class='textbox' style='width:380px;' /></td>\n";
  50.          echo "</tr>\n<tr>\n";
  51.          echo "<td class='tbl1' style='width:80px;'>Darbo rūšis<span style='color:#ff0000'>*</span></td>\n";
  52.          echo "<td class='tbl1'><input type='radio' name='work' class='' value='PSD' style='width:20px;' />.PSD";
  53.          echo "<input type='radio' name='work' class='' value='CODE' style='width:20px;' />KODAS</td>\n";
  54.          echo "</tr>\n<tr>\n";
  55.          echo "<td class='tbl1' style='width:80px;'>Kontaktai<span style='color:#ff0000'>*</span></td>\n";
  56.          echo "<td class='tbl1'>Skype <input type='text' name='skype' class='textbox' style='width:140px;' /><span style='padding-left: 20px;'></span>";
  57.          echo "El'paštas <input type='text' name='email' class='textbox' style='width:140px;' /></td>\n";
  58.          echo "</tr>\n<tr>\n";
  59.          echo "<td align='center' colspan='2' class='tbl'><br />\n";
  60.          echo "<input type='submit' name='siusti' value='Pateikti' class='button' />\n</td>\n";
  61.          echo "</tr>\n</table>\n</form>\n";
  62.          } else {
  63.          
  64.          echo "MYSQL Error":
  65.          }
  66.          
  67.          
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment