View difference between Paste ID: pCrP7sA9 and b4aaTNpB
SHOW: | | - or go back to the newest paste.
1
<?php
2
/*---------------------------------------------------+
3
| PHP-Fusion 7 Content Management System
4
+----------------------------------------------------+
5-
| Copyright ɠ2002 - 2008 Nick Jones
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
   $error = "";
24-
 if ($title == "") {
24+
25
   $descr = htmlspecialchars($_POST['descr']);
26-
 } 
26+
27
   $price = htmlspecialchars($_POST['price']);
28
   $work = ($_POST['work']);
29
   $skype = ($_POST['skype']);
30
   $email = ($_POST['email']);
31
   $cat = isnum($_POST['cat']) ? $_POST['cat'] : "0";
32
   $keliam = dbquery("INSERT INTO ".$db_prefix."themes(title,descr,auth,price,work,skype,email,cat) VALUES ('".$title."', '".$descr."','".$auth."','".$price."','".$work."','".$skype."','".$email."','".$cat."')");
33
    if ($title == "") {
34
  $error .= " <span class='alt'>Kur tavo tile?</span><br />\n";
35-
   
35+
	} 
36
	
37
	if ($error) {
38
	   opentable("Skelbimo pateikimas");
39
	echo "<div style='text-align:center'><br />\nKlaida:<br /><br />\n".$error."<br />\nKlaida</div><br />\n";
40
		closetable();
41
	} else {
42
   opentable("Skelbimo pateikimas");
43
   echo "<div style='text-align:center'><br />\nAčiū, kad pateikėte skelbimą<br /><br />\n";
44
   echo "<a href='submit_theme.php'>Pateikti kitą skelbimą</a><br /><br />\n";
45
   echo "<a href='index.php'>Grįžti į ".$settings['sitename']."</a><br /><br />\n</div>\n";
46
   closetable();
47
	}
48
49
 
50
} else {
51
$opts = "";
52
$result = dbquery("SELECT themes_cat_id, themes_cat_name FROM ".$db_prefix."themes_cats WHERE ".groupaccess("themes_cat_access")." ORDER BY themes_cat_name");
53
      if (dbrows($result) != 0) {
54
         while ($data = dbarray($result)) {                    
55
                 $opts .= "<option value='".$data['themes_cat_id']."'>".$data['themes_cat_name']."</option>\n";
56
                 }
57
         echo "<form method='post'>\n";
58
         echo "<table cellpadding='0' cellspacing='0' class='center' style='width:500px;'>\n<tr>\n";
59
         echo "<td class='tbl'>Pavadinimas<span style='color:#ff0000'>*</span></td>\n";
60
         echo "<td class='tbl'><input type='text' name='title' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
61
         echo "</tr>\n<tr>\n";
62
         echo "<td class='tbl1' style='width:80px; vertical-align:top;'>Aprašymas</td>\n";
63
         echo "<td class='tbl1'><textarea name='descr' cols='60' rows='5' class='textbox' style='width:380px;'></textarea></td>\n";
64
         echo "</tr>\n<tr>\n";
65
         
66
     
67
         
68
         
69
         
70
         echo "<tr>\n<td class='tbl1'>Kategorija<span style='color:#ff0000'>*</span></td>\n";
71
         echo "<td class='tbl1'><select name='cat' class='textbox'>\n".$opts."</select></td>\n";
72
         echo "</tr>\n<tr>\n";
73
         
74
         
75
         echo "<td class='tbl1' style='width:80px;'>Autorius<span style='color:#ff0000'>*</span></td>\n";
76
         echo "<td class='tbl1'><input type='text' name='auth' class='textbox' style='width:380px;' /></td>\n";
77
         echo "</tr>\n<tr>\n";
78
         echo "<td class='tbl1' style='width:80px;'>Kaina<span style='color:#ff0000'>*</span></td>\n";
79
         echo "<td class='tbl1'><input type='text' name='price' class='textbox' style='width:380px;' /></td>\n";
80
         echo "</tr>\n<tr>\n";
81
         echo "<td class='tbl1' style='width:80px;'>Darbo rūšis<span style='color:#ff0000'>*</span></td>\n";
82
         echo "<td class='tbl1'><input type='radio' name='work' class='' value='PSD' style='width:20px;' />.PSD";
83
         echo "<input type='radio' name='work' class='' value='CODE' style='width:20px;' />KODAS</td>\n";
84
         echo "</tr>\n<tr>\n";
85
         echo "<td class='tbl1' style='width:80px;'>Kontaktai<span style='color:#ff0000'>*</span></td>\n";
86
         echo "<td class='tbl1'>Skype <input type='text' name='skype' class='textbox' style='width:140px;' /><span style='padding-left: 20px;'></span>";
87
         echo "El'paštas <input type='text' name='email' class='textbox' style='width:140px;' /></td>\n";
88
         echo "</tr>\n<tr>\n";
89
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
90
         echo "<input type='submit' name='siusti' value='Pateikti' class='button' />\n</td>\n";
91
         echo "</tr>\n</table>\n</form>\n";
92
         } else {
93
                 
94
                 echo "MYSQL Error";
95
                 }
96
         
97
         
98
}
99
}
100
101
require_once THEMES."templates/footer.php";
102
?>