Navigacija

Vartotojų tinkle

Prisijungusių svečių: 57
Prisijungusių narių: 0
Prisijungusių narių nėra

Registruoti nariai: 25,959
Naujausias narys: Simbijanas

Naujausi straipsniai

Paskutiniai nariai

Simbijanas 2 dienos
Karinacraft 1 savaitė
Žmogus 4 savaitės
Bruksnys 8 savaitės
Darexs10 savaitės
Nepas11 savaitės
keistuole13 savaitės
Gizmis15 savaitės
Reikalas15 savaitės
Rytis24 savaitės
MaFetas28 savaitės
ozzWANTED30 savaitės
saulyzas32 savaitės
TOMIJUS33 savaitės
Jaunelis48 savaitės
lanis49 savaitės
And2s49 savaitės
Memento Mori54 savaitės
Quwqkibor57 savaitės
asirija61 savaitės

Informacija:


OS: Unknown
Naršyklė: Nežinoma
IP: 216.73.216.121
Naujienų: 529
Straipsnių: 235
Temų: 52,589
Postų: 522,543
Postų pask. parą: 0
Shout'ų pask. parą: 0
P.S.C. pask. parą: 0
Nuorodų kataloge: 13

Lankomumo Statistika

Peržiūrų šiandien: 22

Iš viso peržiūrų: 22948724

Prisijungti

REGISTRUOTIS
Nario vardas

Slaptažodis



Pamiršai slaptažodį?
Paprašyk naujo

Aktyvuoti save

Šaukykla

Jei norite rašyti žinutes, turite prisijungti.

Žmogus
2025 Geg. 31 10:05:18
Kas geresnio? šypsosi

Nepas
2025 Bal. 9 17:04:13
drovus

Nepas
2025 Bal. 9 17:04:08
drovus

Gizmis
2025 Kov. 15 14:03:50
OMG, smagu matyt sita puslapi veikianti

ozzWANTED
2024 Lap. 30 15:11:14
Taip, vis dar up šypsosi

Šaukyklos archyvas

Apklausa

Ar esate patenkinti lietuviško vertimo kokybe?

Taip!

Taip, bet yra ką taisyti (parašysiu komentaruose)

Ne

Norėdamas balsuoti turite prisijungti.
Archyvas
Reklama 400x60
kazkas negerai su postnewtheard
Forumas | PHP-Fusion, WordPress, Shopify, PHP ir MySQL (PROGRAMAVIMAS) | Žaliems

Autorius: justaslt Peržiūrų: 2207      Spausdinti temą
2008 Gru. 31 19:12:14          1 žinutė iš 12
Spausdinti pranešimą
Kai noriu kurti nauja forume tema man ismeta stai ka :
Parse error: syntax error, unexpected $end in /home/justaslt/srofan.xz.lt/forum/postnewthread.php on line 239

AS isidiegiau user_gold_panel ir po to man tai atsitiko, stai mano postnewtheard

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: ../index.php"); exit; }

if (isset($_POST['previewpost'])) {
$sticky_check = isset($_POST['sticky']) ? " checked" : "";
$sig_checked = isset($_POST['show_sig']) ? " checked" : "";
$disable_smileys_check = isset($_POST['disable_smileys']) ? " checked" : "";
if ($settings['thread_notify']) $notify_checked = isset($_POST['notify_me']) ? " checked" : "";
opentable($locale['400']);
$subject = trim(stripinput(censorwords($_POST['subject'])));
$message = trim(stripinput(censorwords($_POST['message'])));
if ($subject == "") $subject = $locale['420'];
if ($message == "") {
$previewmessage = $locale['421'];
} else {
$previewmessage = $message;
if ($sig_checked) { $previewmessage = $previewmessage."\n\n".$userdata['user_sig']; }
if (!$disable_smileys_check) { $previewmessage = parsesmileys($previewmessage); }
$previewmessage = parseubb($previewmessage);
$previewmessage = nl2br($previewmessage);
}
$is_mod = iMOD && iUSER < "102" ? true : false;
echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' class='tbl-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='1' width='100%'>
<tr>
<td width='145' class='tbl2'>".$locale['422']."</td>
<td class='tbl2'>$subject</td>
</tr>
<tr>
<td valign='top' rowspan='2' width='145' class='tbl1'>".$userdata['user_name']."<br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n";
if ($userdata['user_avatar']) {
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."'><br><br>\n";
$height = "200";
} else {
$height = "60";
}
echo "<span class='alt'>".$locale['423']."</span> ".$userdata['user_posts']."<br>\n";
if ($userdata['user_location']) echo "<span class='alt'>".$locale['424']."</span> ".$userdata['user_location']."<br>\n";
echo "<span class='alt'>".$locale['425']."</span> ".showdate("%d.%m.%y", $userdata['user_joined'])."</td>
<td class='tbl1'><span class='small'>".$locale['426'].showdate("forumdate", time())."</span></td>
</tr>
<tr>
<td height='$height' valign='top' class='tbl1'>$previewmessage</td>
</tr>
</table>
</tr>
</td>
</table>\n";
closetable();
tablebreak();
}
if (isset($_POST['postnewthread'])) {
$flood = false; $error = 0;
$sticky = isset($_POST['sticky']) && (iMOD || iADMIN) ? "1" : "0";
$sig = isset($_POST['show_sig']) ? "1" : "0";
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = trim(stripinput(censorwords($_POST['subject'])));
$message = trim(stripinput(censorwords($_POST['message'])));
if (iMEMBER) {
if ($subject != "" && $message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (!iSUPERADMIN || dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");

//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_new_thread);
//end usergold addon }
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("INSERT INTO ".$db_prefix."threads (forum_id, thread_subject, thread_author, thread_views, thread_lastpost, thread_lastuser, thread_sticky, thread_locked) VALUES('$forum_id', '$subject', '".$userdata['user_id']."', '0', '".time()."', '".$userdata['user_id']."', '$sticky', '0')");
$thread_id = mysql_insert_id();
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$post_id = mysql_insert_id();
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_attach);
//end usergold addon $result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
if ($settings['thread_notify'] && isset($_POST['notify_me'])) $result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')");

if ($settings['attachments']) {
$attach = $_FILES['attach'];
if ($attach['name'] != "" && !empty($attach['name']) && is_uploaded_file($attach['tmp_name'])) {
$attachname = substr($attach['name'], 0, strrpos($attach['name'], "."));
$attachext = strtolower(strrchr($attach['name'],"."));
if (preg_match("/^[-0-9A-Z_\[\]]+$/i", $attachname) && $attach['size'] <= $settings['attachmax']) {
$attachtypes = explode(",", $settings['attachtypes']);
if (in_array($attachext, $attachtypes)) {
$attachname = attach_exists(strtolower($attach['name']));
move_uploaded_file($attach['tmp_name'], FORUM."attachments/".$attachname);
chmod(FORUM."attachments/".$attachname,0644);
if (in_array($attachext, $imagetypes) && (!@getimagesize(FORUM."attachments/".$attachname) || !@verify_image(FORUM."attachments/".$attachname))) {
unlink(FORUM."attachments/".$attachname);
$error = 1;
}
if (!$error) $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '$attachname', '$attachext', '".$attach['size']."')");
} else {
@unlink($attach['tmp_name']);
$error = 1;
}
} else {
@unlink($attach['tmp_name']);
$error = 2;
}
}
}
}
} else {
$error = 3;
}
} else {
$error = 4;
}
if ($error > 2) { redirect("postify.php?post=new&error=$error&forum_id=$forum_id"); }
else { redirect("postify.php?post=new&error=$error&forum_id=$forum_id&thread_id=$thread_id"); }
} else {
if (!isset($_POST['previewpost'])) {
$subject = "";
$message = "";
$sticky_check = "";
$disable_smileys_check = "";
$sig_checked = " checked";
$notify_checked = "";
}
opentable($locale['401']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?action=newthread&amp;forum_id=$forum_id' enctype='multipart/form-data'>
<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='0'>
<tr>
<td width='145' class='tbl2'>".$locale['460']."</td>
<td class='tbl2'><input type='text' name='subject' value='$subject' class='textbox' maxlength='255' style='width: 250px'></td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['461']."</td>
<td class='tbl1'><textarea name='message' cols='80' rows='15' class='textbox'>$message</textarea></td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl2'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '
', '


');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
</td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl1'>
".$locale['462']."<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select>
</td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl2'>
".displaysmileys("message")."
</td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['463']."</td>
<td class='tbl1'>\n";
if (iMOD || iSUPERADMIN) {
echo "<input type='checkbox' name='sticky' value='1'$sticky_check>".$locale['480']."<br>\n";
}
echo "<input type='checkbox' name='disable_smileys' value='1'$disable_smileys_check>".$locale['483'];
if ($userdata['user_sig']) {
echo "<br>\n<input type='checkbox' name='show_sig' value='1'$sig_checked>".$locale['481'];
}
if ($settings['thread_notify']) echo "<br>\n<input type='checkbox' name='notify_me' value='1'$notify_checked>".$locale['485'];
echo "</td>
</tr>\n";
if ($settings['attachments'] == "1") {
echo "<tr>
<td width='145' class='tbl2'>".$locale['464']."</td>
<td class='tbl1'><input type='file' name='attach' enctype='multipart/form-data' class='textbox' style='width:200px;'><br>
<span class='small2'>".sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes']))."</span></td>
</tr>\n";
}
echo "</table>
</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' colspan='2' class='tbl1'>
<input type='submit' name='previewpost' value='".$locale['400']."' class='button'>
<input type='submit' name='postnewthread' value='".$locale['401']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
?>

Kokia cia gali buti problema? gal galite padeti? as supratau kad paskutine eilute yra bloga, bet kuo?
2008 Gru. 31 19:12:18          2 žinutė iš 12
Spausdinti pranešimą
išsidiek, nes ne tavo žinioms

2008 Gru. 31 19:12:09          3 žinutė iš 12
Spausdinti pranešimą
bet ar sunku padeti? skarto isidiek, jauciu veliau rasys medis esi ant php, bet ar galite kas nors padeti? drovus
2008 Gru. 31 19:12:17          4 žinutė iš 12
Spausdinti pranešimą
O tu permetei tą postnewthread.php, jei taip, tai tada blogas modas

2008 Gru. 31 19:12:37          5 žinutė iš 12
Spausdinti pranešimą
taip perkeliau bet ar negali buti kad neislyginau?
kai jis buvo prie sono o kiti uzrasasi ejo toliau nuo krasto, tai as tuos palikau islindusius papa

2008 Gru. 31 20:12:58          6 žinutė iš 12
Spausdinti pranešimą
tai niekas nepasakysite kur problema? žliumbia
2008 Gru. 31 20:12:53          7 žinutė iš 12
Spausdinti pranešimą
tai gal galite padeti?


<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: ../index.php"); exit; }

if (isset($_POST['previewpost'])) {
$sticky_check = isset($_POST['sticky']) ? " checked" : "";
$sig_checked = isset($_POST['show_sig']) ? " checked" : "";
$disable_smileys_check = isset($_POST['disable_smileys']) ? " checked" : "";
if ($settings['thread_notify']) $notify_checked = isset($_POST['notify_me']) ? " checked" : "";
opentable($locale['400']);
$subject = trim(stripinput(censorwords($_POST['subject'])));
$message = trim(stripinput(censorwords($_POST['message'])));
if ($subject == "") $subject = $locale['420'];
if ($message == "") {
$previewmessage = $locale['421'];
} else {
$previewmessage = $message;
if ($sig_checked) { $previewmessage = $previewmessage."\n\n".$userdata['user_sig']; }
if (!$disable_smileys_check) { $previewmessage = parsesmileys($previewmessage); }
$previewmessage = parseubb($previewmessage);
$previewmessage = nl2br($previewmessage);
}
$is_mod = iMOD && iUSER < "102" ? true : false;
echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' class='tbl-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='1' width='100%'>
<tr>
<td width='145' class='tbl2'>".$locale['422']."</td>
<td class='tbl2'>$subject</td>
</tr>
<tr>
<td valign='top' rowspan='2' width='145' class='tbl1'>".$userdata['user_name']."<br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n";
if ($userdata['user_avatar']) {
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."'><br><br>\n";
$height = "200";
} else {
$height = "60";
}
echo "<span class='alt'>".$locale['423']."</span> ".$userdata['user_posts']."<br>\n";
if ($userdata['user_location']) echo "<span class='alt'>".$locale['424']."</span> ".$userdata['user_location']."<br>\n";
echo "<span class='alt'>".$locale['425']."</span> ".showdate("%d.%m.%y", $userdata['user_joined'])."</td>
<td class='tbl1'><span class='small'>".$locale['426'].showdate("forumdate", time())."</span></td>
</tr>
<tr>
<td height='$height' valign='top' class='tbl1'>$previewmessage</td>
</tr>
</table>
</tr>
</td>
</table>\n";
closetable();
tablebreak();
}
if (isset($_POST['postnewthread'])) {
$flood = false; $error = 0;
$sticky = isset($_POST['sticky']) && (iMOD || iADMIN) ? "1" : "0";
$sig = isset($_POST['show_sig']) ? "1" : "0";
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = trim(stripinput(censorwords($_POST['subject'])));
$message = trim(stripinput(censorwords($_POST['message'])));
if (iMEMBER) {
if ($subject != "" && $message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (!iSUPERADMIN || dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("INSERT INTO ".$db_prefix."threads (forum_id, thread_subject, thread_author, thread_views, thread_lastpost, thread_lastuser, thread_sticky, thread_locked) VALUES('$forum_id', '$subject', '".$userdata['user_id']."', '0', '".time()."', '".$userdata['user_id']."', '$sticky', '0')");
$thread_id = mysql_insert_id();
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$post_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
if ($settings['thread_notify'] && isset($_POST['notify_me'])) $result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')");

if ($settings['attachments']) {
$attach = $_FILES['attach'];
if ($attach['name'] != "" && !empty($attach['name']) && is_uploaded_file($attach['tmp_name'])) {
$attachname = substr($attach['name'], 0, strrpos($attach['name'], "."));
$attachext = strtolower(strrchr($attach['name'],"."));
if (preg_match("/^[-0-9A-Z_\[\]]+$/i", $attachname) && $attach['size'] <= $settings['attachmax']) {
$attachtypes = explode(",", $settings['attachtypes']);
if (in_array($attachext, $attachtypes)) {
$attachname = attach_exists(strtolower($attach['name']));
move_uploaded_file($attach['tmp_name'], FORUM."attachments/".$attachname);
chmod(FORUM."attachments/".$attachname,0644);
if (in_array($attachext, $imagetypes) && (!@getimagesize(FORUM."attachments/".$attachname) || !@verify_image(FORUM."attachments/".$attachname))) {
unlink(FORUM."attachments/".$attachname);
$error = 1;
}
if (!$error) $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '$attachname', '$attachext', '".$attach['size']."')");
} else {
@unlink($attach['tmp_name']);
$error = 1;
}
} else {
@unlink($attach['tmp_name']);
$error = 2;
}
}
}
}
} else {
$error = 3;
}
} else {
$error = 4;
}
if ($error > 2) { redirect("postify.php?post=new&error=$error&forum_id=$forum_id"); }
else { redirect("postify.php?post=new&error=$error&forum_id=$forum_id&thread_id=$thread_id"); }
} else {
if (!isset($_POST['previewpost'])) {
$subject = "";
$message = "";
$sticky_check = "";
$disable_smileys_check = "";
$sig_checked = " checked";
$notify_checked = "";
}
opentable($locale['401']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?action=newthread&amp;forum_id=$forum_id' enctype='multipart/form-data'>
<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='0'>
<tr>
<td width='145' class='tbl2'>".$locale['460']."</td>
<td class='tbl2'><input type='text' name='subject' value='$subject' class='textbox' maxlength='255' style='width: 250px'></td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['461']."</td>
<td class='tbl1'><textarea name='message' cols='80' rows='15' class='textbox'>$message</textarea></td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl2'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '
', '


');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
</td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl1'>
".$locale['462']."<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select>
</td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl2'>
".displaysmileys("message")."
</td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['463']."</td>
<td class='tbl1'>\n";
if (iMOD || iSUPERADMIN) {
echo "<input type='checkbox' name='sticky' value='1'$sticky_check>".$locale['480']."<br>\n";
}
echo "<input type='checkbox' name='disable_smileys' value='1'$disable_smileys_check>".$locale['483'];
if ($userdata['user_sig']) {
echo "<br>\n<input type='checkbox' name='show_sig' value='1'$sig_checked>".$locale['481'];
}
if ($settings['thread_notify']) echo "<br>\n<input type='checkbox' name='notify_me' value='1'$notify_checked>".$locale['485'];
echo "</td>
</tr>\n";
if ($settings['attachments'] == "1") {
echo "<tr>
<td width='145' class='tbl2'>".$locale['464']."</td>
<td class='tbl1'><input type='file' name='attach' enctype='multipart/form-data' class='textbox' style='width:200px;'><br>
<span class='small2'>".sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes']))."</span></td>
</tr>\n";
}
echo "</table>
</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' colspan='2' class='tbl1'>
<input type='submit' name='previewpost' value='".$locale['400']."' class='button'>
<input type='submit' name='postnewthread' value='".$locale['401']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
?>


Padarykite kaip rasoma :

Atsidarome failą postnewthred.php ir 82 antroje eilutėje įterpiame šį kodą:
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_new_thread);
//end usergold addon
-----------------------
Pinigai už prisegtą failą:
faile postnewthread.php 92 eilutėje [NOTE: jei jūs dėjote ankščiau paminėtą kodą, už postą forume, tai eilutė bus 95]
Įterpiame šį kodą:
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_attach);
//end usergold addon

Jeigu gerai viskas tada bus , tada zinosiu kad cia mano klaida :(

2008 Gru. 31 22:12:31          8 žinutė iš 12
Spausdinti pranešimą
Reikejo taip padaryti:

Atsidarome failą postnewthred.php ir 82 antroje eilutėje įterpiame šį kodą:
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_new_thread);
//end usergold addon
-----------------------
Pinigai už prisegtą failą:
faile postnewthread.php 92 eilutėje [NOTE: jei jūs dėjote ankščiau paminėtą kodą, už postą forume, tai eilutė bus 95]
Įterpiame šį kodą:
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_attach);
//end usergold addon

gavosi va taip :



<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 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
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: ../index.php"); exit; }

if (isset($_POST['previewpost'])) {
$sticky_check = isset($_POST['sticky']) ? " checked" : "";
$sig_checked = isset($_POST['show_sig']) ? " checked" : "";
$disable_smileys_check = isset($_POST['disable_smileys']) ? " checked" : "";
if ($settings['thread_notify']) $notify_checked = isset($_POST['notify_me']) ? " checked" : "";
opentable($locale['400']);
$subject = trim(stripinput(censorwords($_POST['subject'])));
$message = trim(stripinput(censorwords($_POST['message'])));
if ($subject == "") $subject = $locale['420'];
if ($message == "") {
$previewmessage = $locale['421'];
} else {
$previewmessage = $message;
if ($sig_checked) { $previewmessage = $previewmessage."\n\n".$userdata['user_sig']; }
if (!$disable_smileys_check) { $previewmessage = parsesmileys($previewmessage); }
$previewmessage = parseubb($previewmessage);
$previewmessage = nl2br($previewmessage);
}
$is_mod = iMOD && iUSER < "102" ? true : false;
echo "<table cellspacing='0' cellpadding='0' border='0' width='100%' class='tbl-border'>
<tr>
<td>
<table cellpadding='0' cellspacing='1' width='100%'>
<tr>
<td width='145' class='tbl2'>".$locale['422']."</td>
<td class='tbl2'>$subject</td>
</tr>
<tr>
<td valign='top' rowspan='2' width='145' class='tbl1'>".$userdata['user_name']."<br>
<span class='alt'>".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."</span><br><br>\n";
if ($userdata['user_avatar']) {
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."'><br><br>\n";
$height = "200";
} else {
$height = "60";
}
echo "<span class='alt'>".$locale['423']."</span> ".$userdata['user_posts']."<br>\n";
if ($userdata['user_location']) echo "<span class='alt'>".$locale['424']."</span> ".$userdata['user_location']."<br>\n";
echo "<span class='alt'>".$locale['425']."</span> ".showdate("%d.%m.%y", $userdata['user_joined'])."</td>
<td class='tbl1'><span class='small'>".$locale['426'].showdate("forumdate", time())."</span></td>
</tr>
<tr>
<td height='$height' valign='top' class='tbl1'>$previewmessage</td>
</tr>
</table>
</tr>
</td>
</table>\n";
closetable();
tablebreak();
}
if (isset($_POST['postnewthread'])) {
$flood = false; $error = 0;
$sticky = isset($_POST['sticky']) && (iMOD || iADMIN) ? "1" : "0";
$sig = isset($_POST['show_sig']) ? "1" : "0";
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = trim(stripinput(censorwords($_POST['subject'])));
$message = trim(stripinput(censorwords($_POST['message'])));
if (iMEMBER) {
if ($subject != "" && $message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (!iSUPERADMIN || dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_new_thread);
//end usergold addon

}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("INSERT INTO ".$db_prefix."threads (forum_id, thread_subject, thread_author, thread_views, thread_lastpost, thread_lastuser, thread_sticky, thread_locked) VALUES('$forum_id', '$subject', '".$userdata['user_id']."', '0', '".time()."', '".$userdata['user_id']."', '$sticky', '0')");
$thread_id = mysql_insert_id();
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$post_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
if ($settings['thread_notify'] && isset($_POST['notify_me'])) $result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')");

//Start usergold addon
paygold($userdata['user_name'],$userdata['user_id'],$user_gold_attach);
//end usergold addon

if ($settings['attachments']) {
$attach = $_FILES['attach'];
if ($attach['name'] != "" && !empty($attach['name']) && is_uploaded_file($attach['tmp_name'])) {
$attachname = substr($attach['name'], 0, strrpos($attach['name'], "."));
$attachext = strtolower(strrchr($attach['name'],"."));
if (preg_match("/^[-0-9A-Z_\[\]]+$/i", $attachname) && $attach['size'] <= $settings['attachmax']) {
$attachtypes = explode(",", $settings['attachtypes']);
if (in_array($attachext, $attachtypes)) {
$attachname = attach_exists(strtolower($attach['name']));
move_uploaded_file($attach['tmp_name'], FORUM."attachments/".$attachname);
chmod(FORUM."attachments/".$attachname,0644);
if (in_array($attachext, $imagetypes) && (!@getimagesize(FORUM."attachments/".$attachname) || !@verify_image(FORUM."attachments/".$attachname))) {
unlink(FORUM."attachments/".$attachname);
$error = 1;
}
if (!$error) $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '$attachname', '$attachext', '".$attach['size']."')");
} else {
@unlink($attach['tmp_name']);
$error = 1;
}
} else {
@unlink($attach['tmp_name']);
$error = 2;
}
}
}
}
} else {
$error = 3;
}
} else {
$error = 4;
}
if ($error > 2) { redirect("postify.php?post=new&error=$error&forum_id=$forum_id"); }
else { redirect("postify.php?post=new&error=$error&forum_id=$forum_id&thread_id=$thread_id"); }
} else {
if (!isset($_POST['previewpost'])) {
$subject = "";
$message = "";
$sticky_check = "";
$disable_smileys_check = "";
$sig_checked = " checked";
$notify_checked = "";
}
opentable($locale['401']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?action=newthread&amp;forum_id=$forum_id' enctype='multipart/form-data'>
<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>
<tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='0'>
<tr>
<td width='145' class='tbl2'>".$locale['460']."</td>
<td class='tbl2'><input type='text' name='subject' value='$subject' class='textbox' maxlength='255' style='width: 250px'></td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['461']."</td>
<td class='tbl1'><textarea name='message' cols='80' rows='15' class='textbox'>$message</textarea></td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl2'>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '', '');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '', '');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '
', '


');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '
', '
');\">
</td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl1'>
".$locale['462']."<select name='bbcolor' class='textbox' style='width:90px;' onChange=\"addText('message', '[color=' + this.options[this.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;\">
<option value=''>Default</option>
<option value='maroon' style='color:maroon;'>Maroon</option>
<option value='red' style='color:red;'>Red</option>
<option value='orange' style='color:orange;'>Orange</option>
<option value='brown' style='color:brown;'>Brown</option>
<option value='yellow' style='color:yellow;'>Yellow</option>
<option value='green' style='color:green;'>Green</option>
<option value='lime' style='color:lime;'>Lime</option>
<option value='olive' style='color:olive;'>Olive</option>
<option value='cyan' style='color:cyan;'>Cyan</option>
<option value='blue' style='color:blue;'>Blue</option>
<option value='navy' style='color:navy;'>Navy Blue</option>
<option value='purple' style='color:purple;'>Purple</option>
<option value='violet' style='color:violet;'>Violet</option>
<option value='black' style='color:black;'>Black</option>
<option value='gray' style='color:gray;'>Gray</option>
<option value='silver' style='color:silver;'>Silver</option>
<option value='white' style='color:white;'>White</option>
</select>
</td>
</tr>
<tr>
<td width='145' class='tbl2'>&nbsp;</td>
<td class='tbl2'>
".displaysmileys("message")."
</td>
</tr>
<tr>
<td valign='top' width='145' class='tbl2'>".$locale['463']."</td>
<td class='tbl1'>\n";
if (iMOD || iSUPERADMIN) {
echo "<input type='checkbox' name='sticky' value='1'$sticky_check>".$locale['480']."<br>\n";
}
echo "<input type='checkbox' name='disable_smileys' value='1'$disable_smileys_check>".$locale['483'];
if ($userdata['user_sig']) {
echo "<br>\n<input type='checkbox' name='show_sig' value='1'$sig_checked>".$locale['481'];
}
if ($settings['thread_notify']) echo "<br>\n<input type='checkbox' name='notify_me' value='1'$notify_checked>".$locale['485'];
echo "</td>
</tr>\n";
if ($settings['attachments'] == "1") {
echo "<tr>
<td width='145' class='tbl2'>".$locale['464']."</td>
<td class='tbl1'><input type='file' name='attach' enctype='multipart/form-data' class='textbox' style='width:200px;'><br>
<span class='small2'>".sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes']))."</span></td>
</tr>\n";
}
echo "</table>
</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='center' colspan='2' class='tbl1'>
<input type='submit' name='previewpost' value='".$locale['400']."' class='button'>
<input type='submit' name='postnewthread' value='".$locale['401']."' class='button'>
</td>
</tr>
</table>
</form>\n";
closetable();
}
?>

2008 Gru. 31 22:12:33          9 žinutė iš 12
Spausdinti pranešimą
Tai tu parodyk vieta kur keitej kodą kuri dėjai o ne čia š. malk

code and design solutions tinklalapių kūrimas
2008 Gru. 31 22:12:39          10 žinutė iš 12
Spausdinti pranešimą
susitvarkiau daba to s nemeta, bet kai sukuriu tema, tai man ismeta Parse error: syntax error, unexpected '}' in /home/justaslt/srofan.xz.lt/forum/viewthread.php on line 81.

$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");

kokia cia gali buti problema? ?|

2009 Sau. 2 13:01:02          11 žinutė iš 12
Spausdinti pranešimą
Padesite? drovus
2009 Sau. 2 13:01:58          12 žinutė iš 12
Spausdinti pranešimą
nlb nežino

Peršokti į forumą: