Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*---------------------------------------------------+
- | PHP-Fusion 7 Content Management System
- +----------------------------------------------------+
- | Copyright ?2002 - 2008 Nick Jones
- | http://www.php-fusion.co.uk/
- +----------------------------------------------------+
- | Released under the terms & conditions of v2 of the
- | GNU General Public License. For details refer to
- | the included gpl.txt file or visit http://gnu.org
- +----------------------------------------------------+
- | For PHP-Fusion 7.02.xx
- +----------------------------------------------------*/
- require_once "maincore.php";
- require_once THEMES."templates/header.php";
- add_to_title(" - Skelbimo pateikimas");
- if (!iGUEST) {
- if(isset($_POST['siusti'])){
- $error = "";
- $title = stripslash($_POST['title']);
- $descr = stripslash($_POST['descr']);
- $auth = stripslash($_POST['auth']);
- $price = stripslash($_POST['price']);
- $work = stripslash($_POST['work']);
- $skype = stripslash($_POST['skype']);
- $email = stripslash($_POST['email']);
- $file = stripslash($_POST['file']);
- $cat = isnum($_POST['cat']) ? $_POST['cat'] : "0";
- $keliam = dbquery("INSERT INTO ".$db_prefix."themes(title,descr,auth,price,work,skype,email,cat,file) VALUES ('".$title."', '".$descr."','".$auth."','".$price."','".$work."','".$skype."','".$email."','".$cat."','".$file."')");
- if ($title == "") {
- $error .= " <span class='alt'>Būtina užpildyti visus duotus laukelius!</span><br />\n";
- }
- if ($auth == "") {
- $error .= " <span class='alt'>Būtina užpildyti visus duotus laukelius!</span><br />\n";
- }
- if ($price == "") {
- $error .= " <span class='alt'>Būtina užpildyti visus duotus laukelius!</span><br />\n";
- }
- if ($file == "") {
- $error .= " <span class='alt'>Būtina užpildyti visus duotus laukelius!</span><br />\n";
- }
- if ($error) {
- opentable("Skelbimo pateikimas");
- echo "<div style='text-align:center'>\n".$error."</div>\n";
- closetable();
- } else {
- opentable("Skelbimo pateikimas");
- echo "<div style='text-align:center'><br />\nAčiū, kad pateikėte skelbimą<br /><br />\n";
- echo "<a href='submit_theme.php'>Pateikti kitą skelbimą</a><br /><br />\n";
- echo "<a href='index.php'>Grįžti į ".$settings['sitename']."</a><br /><br />\n</div>\n";
- closetable();
- }
- } else {
- $opts = "";
- $result = dbquery("SELECT themes_cat_id, themes_cat_name FROM ".$db_prefix."themes_cats WHERE ".groupaccess("themes_cat_access")." ORDER BY themes_cat_name");
- if (dbrows($result) != 0) {
- while ($data = dbarray($result)) {
- $opts .= "<option value='".$data['themes_cat_id']."'>".$data['themes_cat_name']."</option>\n";
- }
- echo "<form method='post' action='upload_file.php' enctype='multipart/form-data'>\n";
- echo "<table cellpadding='0' cellspacing='0' class='center' style='width:500px;'>\n<tr>\n";
- echo "<td class='tbl'>Pavadinimas<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl'><input type='text' name='title' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
- echo "</tr>\n<tr>\n";
- echo "<td class='tbl1' style='width:80px; vertical-align:top;'>Aprašymas</td>\n";
- echo "<td class='tbl1'><textarea name='descr' cols='60' rows='5' class='textbox' style='width:380px;'></textarea></td>\n";
- echo "</tr>\n<tr>\n";
- echo "<tr>\n<td class='tbl1'>Kategorija<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl1'><select name='cat' class='textbox'>\n".$opts."</select></td>\n";
- echo "</tr>\n<tr>\n";
- echo "<td class='tbl1' style='width:80px;'>Autorius<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl1'><input type='text' name='auth' class='textbox' style='width:380px;' /></td>\n";
- echo "</tr>\n<tr>\n";
- echo "<td class='tbl1' style='width:80px;'>Kaina<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl1'><input type='text' name='price' class='textbox' style='width:380px;' /></td>\n";
- echo "</tr>\n<tr>\n";
- echo "<td class='tbl1' style='width:80px;'>Darbo rūšis<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl1'><input type='radio' name='work' class='' value='PSD' style='width:20px;' />.PSD";
- echo "<input type='radio' name='work' class='' value='CODE' style='width:20px;' />KODAS</td>\n";
- echo "</tr>\n<tr>\n";
- echo "<td class='tbl1' style='width:80px;'>Kontaktai<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl1'>Skype <input type='text' name='skype' class='textbox' style='width:140px;' /><span style='padding-left: 20px;'></span>";
- echo "El'paštas <input type='text' name='email' class='textbox' style='width:140px;' /></td>\n";
- echo "</tr>\n<tr>\n";
- echo "<form action='upload_file.php' enctype='multipart/form-data'>\n";
- echo "<td class='tbl1' style='width:80px;'>Nuotrauka<span style='color:#ff0000'>*</span></td>\n";
- echo "<td class='tbl1'><input type='file' name='file' id='file' style='width:380px;' /></td>\n";
- echo "</tr>\n<tr>\n";
- echo "</form>";
- echo "<td align='center' colspan='2' class='tbl'><br />\n";
- echo "<input type='submit' name='siusti' value='Pateikti' class='button' />\n</td>\n";
- echo "</tr>\n</table>\n</form>\n";
- } else {
- echo "MYSQL Error";
- }
- }
- }
- require_once THEMES."templates/footer.php";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement