Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: prasymai tik VIP nariams

Parašė ramon· 2007 Spa. 9 23:10:17
#4

<?php
if (file_exists(INFUSIONS."prasymai_box/locale/".$settings['locale'].".php")) {
include INFUSIONS."prasymai_box/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."prasymai_box/locale/lithuanian.php";
}
if (checkgroup("2")) fallback("index.php");
if (iMEMBER) {

if (!isset($step)) $step = "";

if (isset($_POST['submit_suggestion'])) {
$suggestion_summary = stripinput($_POST['suggestion_summary']);
$suggestion_version = stripinput($_POST['suggestion_version']);
$suggestion_description = stripinput($_POST['suggestion_description']);
if ($suggestion_summary != "" && $suggestion_description != "") {
$result = dbquery("INSERT INTO ".$db_prefix."prasymai_box VALUES('', '".$userdata['user_id']."', '$suggestion_summary', '$suggestion_version', '$suggestion_description', '', '".$locale['err142']."', '".time()."')");
}
redirect(FUSION_SELF);
}
if ($step == "view") {
include INCLUDES."comments_include.php";
if (!$suggestion_id || !isNum($suggestion_id)) fallback(FUSION_SELF);
opentable($locale['err110']);
$data = dbarray(dbquery(
"SELECT ter.*, user_id,user_name FROM ".$db_prefix."prasymai_box ter
LEFT JOIN ".$db_prefix."users tusr ON ter.suggestion_user=tusr.user_id
WHERE suggestion_id='".$suggestion_id."'"
));
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td class='tbl2'><b>".$data['suggestion_summary']."</b></td>
</tr>
<tr>
<td width='125' class='tbl2'>".$locale['err111']."</td>
<td class='tbl1'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a> -
".strftime($settings['longdate'], $data['suggestion_datestamp']+($settings['timeoffset']*3600))."</td>
</tr>
<tr>
<td width='125' class='tbl2'>".$locale['err112']."</td>
<td class='tbl1'>".$data['suggestion_version']."</td>
</tr>
<tr>
<td width='125' class='tbl2'>".$locale['err113']."</td>
<td class='tbl1'>".nl2br($data['suggestion_description'])."</td>
</tr>\n";
if ($data['suggestion_response']) {
echo "<tr>
<td width='125' class='tbl2'>".$locale['err114']."</td>
<td class='tbl1'>".nl2br($data['suggestion_response'])."</td>
</tr>\n";
}
echo "<tr>
<td width='125' class='tbl2'>".$locale['err115']."</td>
<td class='tbl1'>".$data['suggestion_status']."</td>
</tr>
<center></table>\n";
closetable();
showcomments("E","prasymai_box","suggestion_id",$suggestion_id,FUSION_SELF."?step=view&suggestion_id=$suggestion_id","");
tablebreak();
}
opentable($locale['err120']);
$result = dbquery(
"SELECT ter.*, user_id,user_name, COUNT(comment_item_id) AS suggestion_comments
FROM ".$db_prefix."prasymai_box ter
LEFT JOIN ".$db_prefix."users tusr ON ter.suggestion_user=tusr.user_id
LEFT JOIN ".$db_prefix."comments ON ter.suggestion_id=comment_item_id AND comment_type='E'
GROUP BY suggestion_id ORDER BY suggestion_datestamp DESC"
);
if (dbrows($result)) {
$i = 0;
echo "<table width='100%' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' width='125' class='tbl2'>".$locale['err121']."</td>
<td align='center' width='150' class='tbl2'>".$locale['err122']."</td>
<td align='center' width='125' class='tbl2'>".$locale['err111']."</td>
<td align='center' width='150' class='tbl2'>".$locale['err115']."</td>
<td align='center' width='125' class='tbl2'>".$locale['err116']."</td>
</tr>\n";
while ($data = dbarray($result)) {
$i % 2 == 0 ? $tclass="tbl1" : $tclass="tbl2";
echo "<tr>
<td align='center' class='$tclass'>".$data['suggestion_id']."</td>
<td align='center' class='$tclass'><a href='".FUSION_SELF."?step=view&suggestion_id=".$data['suggestion_id']."'>".$data['suggestion_summary']."</a></td>
<td align='center' class='$tclass'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>
<td align='center' class='$tclass'>".$data['suggestion_status']."</td>
<td align='center' class='$tclass'>".$data['suggestion_comments']."</td>
</tr>\n";
}
echo "</table></center>\n";
} else {
echo "<center><br>\n".$locale['err123']."<br><br>\n</center>\n";
}
closetable();
tablebreak();
opentable($locale['err130']);
echo "<form name='reportform' method='post' action='".FUSION_SELF."'>
".$locale['err135']."
<table align='center' cellspacing='0' cellpadding='0' class='tbl'>
<tr>
<td>".$locale['err131']."</td>
<td><input type='text' name='suggestion_summary' class='textbox' style='width:300px;'></td>
</tr>
<tr>
<td valign='top'>".$locale['err134']."</td>
<td><textarea name='suggestion_description' rows='5' class='textbox' style='width:300px;'></textarea></td>
</tr>
<tr>
<td align='center' colspan='2'>
<input type='submit' name='submit_suggestion' value='".$locale['err130']."' class='button'></td>
</tr>
</table>
<hr>
<table><table border='1'>
<tr>
<td> <B><center>".$locale['err170']."</b></td>
<td> <B> <center>".$locale['err171']."</b></td>
</tr>
<rt>
<td> <center>".$locale['err172']."</td>
<td> <center>".$locale['err173']."</td>
</tr>
<tr>
<td> <center>".$locale['err174']."</td>
<td> <center>".$locale['err175']."</td>
</tr>
<tr>
<td> <center>".$locale['err176']."</td>
<td> <center>".$locale['err177']."</td>
</tr>
<tr>
<td> <center>".$locale['err178']."</td>
<td> <center>".$locale['err179']."</td>
</tr>
<tr>
<td> <center>".$locale['err180']."</td>
<td> <center>".$locale['err181']."</td>
</table>
</form>\n";
closetable();

} else {
opentable($locale['err120']);
echo "<center><br>\n".$locale['err124']."<br><br>\n</center>\n";
closetable();
}

?>