[ | ]
8) { ?>


 
2 && $passwordError<8 && !isset($erroruser1) && !isset($errormessageUsername)) $errmsgpwd = $la_empty_old_password; if (isset($errorpwd1)) $errmsgpwd = $la_pwd_not_match; if (isset($errmsgpwd)) { ?>
 

 
 
 

   
   
   
 


 
 

 
 
   
   
/>
/>
 
 

Forum Tools */ ?>
> >
1 ORDER BY FORUM_MESSAGES.date DESC"); elseif ($_SESSION[user] == "employee") $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_MESSAGES.date LIKE '%$dstamp%' ORDER BY FORUM_MESSAGES.date DESC"); else $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_TOPICS.type = '3' AND FORUM_MESSAGES.date LIKE '%$dstamp%' ORDER BY FORUM_MESSAGES.date DESC"); } elseif(!empty($_POST[search])) { if ($_SESSION[user] == "client") $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = FORUM_TOPICS.id AND (date LIKE '%$_POST[search]%' OR title LIKE '%$_POST[search]%' OR message LIKE '%$_POST[search]%') AND FORUM_TOPICS.type>1 ORDER BY FORUM_MESSAGES.date DESC"); elseif ($_SESSION[user] == "employee") $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = FORUM_TOPICS.id AND (date LIKE '%$_POST[search]%' OR title LIKE '%$_POST[search]%' OR message LIKE '%$_POST[search]%') ORDER BY FORUM_MESSAGES.date DESC"); else $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_TOPICS.type = '3' AND (date LIKE '%$_POST[search]%' OR title LIKE '%$_POST[search]%' OR message LIKE '%$_POST[search]%') ORDER BY FORUM_MESSAGES.date DESC"); } else { if (!empty($_GET[ratings])) $orderby = 'ratings'; if (!empty($_GET[lastpost])) $orderby = 'date DESC'; if (!empty($_GET[replies])) $orderby = 'replies DESC'; if (!empty($_GET[views])) $orderby = 'views DESC'; else $orderby = 'date ASC'; if ($_SESSION[user] == "employee") $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = '$forum_catid' AND FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_MESSAGES.subid = '$forum_subid' AND FORUM_MESSAGES.type = '1' ORDER BY FORUM_MESSAGES.$orderby"); elseif ($_SESSION[user] == "client") $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = '$forum_catid' AND FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_MESSAGES.subid = '$forum_subid' AND FORUM_MESSAGES.type = '1' AND FORUM_TOPICS.type>1 ORDER BY FORUM_MESSAGES.$orderby"); else $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = '$forum_catid' AND FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_MESSAGES.subid = '$forum_subid' AND FORUM_MESSAGES.type = '1' AND FORUM_TOPICS.type>2 ORDER BY FORUM_MESSAGES.$orderby"); } $num_res = mysql_num_rows($result); if ($num_res<1) { ?> 1) { $message_title = "$la_re:"; $message_title.= showTableFieldTwo('FORUM_MESSAGES','title','message_id',$id,'type',1); } $date_posted1 = substr($date_posted,0,10); $time_posted1 = substr($date_posted,11,5); $hour_posted = substr($time_posted1,0,2); if ($hour_posted<12) $time_posted1 = "$time_posted1 AM"; if ($hour_posted>12) { $hour_posted = $hour_posted-12; $min_posted = substr($time_posted1,3,2); $time_posted1 = "$hour_posted:$min_posted PM"; } if ($hour_posted == "12") $time_posted1 = "$time_posted1 PM"; $last_message_posted_by = showTableFieldTwoLastEntry('FORUM_MESSAGES','posted_by','message_id',$id,'type',2,'date DESC'); if ($date_posted1 == "$dstamp") $date_posted1 = ucfirst($la_today); if (substr($last_message_posted_by,0,4) == "EILS") $last_message_posted_by_name = showEmployeeNameSTRING($last_message_posted_by); if (substr($posted_by,0,4) == "EILS") $posted_by_name = showEmployeeNameSTRING($posted_by); if (substr($last_message_posted_by,0,2) == "CA") { $last_message_posted_by_name = showTableField('CLIENTDETAILS','nickname','OfficeFileNo',$last_message_posted_by); if (empty($last_message_posted_by_name)) $last_message_posted_by_name = showClientNameSTRING($last_message_posted_by); } if (substr($posted_by,0,2) == "CA") { $posted_by_name = showTableField('CLIENTDETAILS','nickname','OfficeFileNo',$posted_by); if (empty($posted_by_name)) $posted_by_name = showClientNameSTRING($posted_by); } if (substr($last_message_posted_by,0,2) == "VI") { $last_message_posted_by_name = showTableField('VISITORS_RECORD','nickname','visitor_id',$last_message_posted_by); if (empty($last_message_posted_by_name)) $last_message_posted_by_name = showIndividualFullName('VISITORS_RECORD','visitor_id',$last_message_posted_by,'',''); } if (substr($posted_by,0,2) == "VI") { $posted_by_name = showTableField('VISITORS_RECORD','nickname','visitor_id',$posted_by); if (empty($posted_by_name)) $posted_by_name = showIndividualFullName('VISITORS_RECORD','visitor_id',$posted_by,'',''); } $total_replies = showNumRowsInTABLE('FORUM_MESSAGES','message_id',$id,'type',2,'',''); if ($message_type == "1" && ($approve == "1" || $userlevelEmployee == "1" || $posted_by == "$_SESSION[userid]")) { ?>
?forum=&Action=orderByReplies&id=&forum_catid=&forum_subid=" ">Reverse Sort Order */ ?>



0) { ?>

<? echo $la_go_last_post ?>
"; if (isset($_SESSION[user])) showForumPageNavigation($forum_catid,$forum_subid,$id); $thread_name = showTableField('FORUM_TOPICS','name','id',$forum_catid); $thread_name2 = showTableFieldname('FORUM','name',"catid = '$forum_catid' AND subid = '$forum_subid'"); openClientControlPanelJscript(); showJavaScriptConfirmForm('',$la_confirm_delete_message,$la_confirm_approve_message,'',''); ?> //************* end of items not published**************** */ ?>
> >
1 ORDER BY FORUM_MESSAGES.date ASC"); else $result = mysql_query("SELECT FORUM_MESSAGES.id,FORUM_MESSAGES.message_id,FORUM_MESSAGES.posted_by,FORUM_MESSAGES.date,FORUM_MESSAGES.title,FORUM_MESSAGES.message,FORUM_MESSAGES.views,FORUM_MESSAGES.ratings,FORUM_MESSAGES.approve,FORUM_MESSAGES.status,FORUM_MESSAGES.catid,FORUM_MESSAGES.subid,FORUM_MESSAGES.type FROM FORUM_MESSAGES,FORUM_TOPICS WHERE FORUM_MESSAGES.catid = '$forum_catid' AND FORUM_MESSAGES.catid = FORUM_TOPICS.id AND FORUM_MESSAGES.subid = '$forum_subid' AND FORUM_MESSAGES.message_id = '$id' AND FORUM_TOPICS.type>2 ORDER BY FORUM_MESSAGES.date ASC"); } $num_res = mysql_num_rows($result); for ($i=1; $i<$num_res+1; $i++) { $row = mysql_fetch_array($result); $id = $row["message_id"]; $posted_by = $row["posted_by"]; $date_posted = $row["date"]; $message_title = $row["title"]; $message = $row["message"]; $message = stripslashes($message); $message = nl2br($message); $views = $row["views"]; $ratings = $row["ratings"]; $approve = $row["approve"]; $status = $row["status"]; $message2 = substr($message,0,50); $message_type = $row["type"]; $date_posted1 = substr($date_posted,0,10); $time_posted1 = substr($date_posted,11,5); $last_message_posted_by = showTableFieldTwoLastEntry('FORUM_MESSAGES','posted_by','message_id',$id,'type',2,'date DESC'); if (substr($last_message_posted_by,0,4) == "EILS") $last_message_posted_by_name = showEmployeeNameSTRING($last_message_posted_by); if (substr($last_message_posted_by,0,2) == "CA") $last_message_posted_by_name = showClientNameSTRING($last_message_posted_by); if (substr($posted_by,0,4) == "EILS") { $posted_by_name = showEmployeeNameSTRING($posted_by); $posted_by_position = showTableField('EMPLOYEES','Designation','EmployeeID',$posted_by); $forum_individual_quote = showTableField('EMPLOYEES','forum_quote','EmployeeID',$posted_by); $image_link = "$root_url/images/employee/$posted_by.jpg"; } if (substr($posted_by,0,2) == "CA") { $posted_by_name = showClientNameSTRING($posted_by); $posted_by_nickname = showTableField('CLIENTDETAILS','nickname','OfficeFileNo',$posted_by); if (empty($posted_by_nickname) || $user == "employee") { $posted_by_name = $posted_by_name; } if (!empty($posted_by_nickname) && $user != "employee") { $posted_by_name = $posted_by_nickname; } $imageStatus = showTableField('MAIN','image','OfficeFileNo',$posted_by); $forum_image = showTableField('MAIN','forum_image','OfficeFileNo',$posted_by); if ($imageStatus == "1" && ($forum_image == "1" || $user == "employee")) $image_link = "$root_url/images/client/$posted_by.jpg"; else $image_link = "$root_url/images/client/$defaultImage"; $posted_by_position = $la_client; $forum_individual_quote = showTableField('MAIN','forum_quote','OfficeFileNo',$posted_by); } if (substr($posted_by,0,2) == "VI") { $posted_by_name = showIndividualFullName('VISITORS_RECORD','visitor_id',$posted_by,'',''); $posted_by_nickname = showTableField('VISITORS_RECORD','nickname','visitor_id',$posted_by); if (empty($posted_by_nickname) || $user == "employee") { $posted_by_name = $posted_by_name; } if (!empty($posted_by_nickname) && $user != "employee") { $posted_by_name = $posted_by_nickname; } $imageStatus = showTableField('VISITORS_RECORD','image','visitor_id',$posted_by); $forum_image = showTableField('VISITORS_RECORD','forum_image','visitor_id',$posted_by); if ($imageStatus == "1" && ($forum_image == "1" || $user == "employee")) $image_link = "$root_url/images/visitors/$posted_by.jpg"; else $image_link = "$root_url/images/visitors/$defaultImage"; $posted_by_position = ucfirst($la_visitor); $forum_individual_quote = showTableField('VISITORS_RECORD','forum_quote','visitor_id',$posted_by); } $total_posted1 = showNumRowsInTABLE('FORUM_MESSAGES','posted_by',$posted_by,'','','','',''); $total_replies = showNumRowsInTABLE('FORUM_MESSAGES','message_id',$id,'type',2,'',''); if ($approve == "1" || $userlevelEmployee == "1" || $posted_by == "$userid") { ?>
Old #
$posted_by_nickname"; } elseif (substr($posted_by,0,2) == "VI" && $user == "employee") { ?> $posted_by_nickname"; } else { ?>

<? echo $posted_by_name ?>

Default


_________________________________________________________
<? echo ucwords(" border="0" /> <? echo ucwords(" border="0" /> <? echo ucwords(" border="0" /> <? echo $la_quick_reply_forum_message ?>
« Previous Thread | Next Thread »
************ the items above can be added later on*************** */ showForumFooter(); exit; } //************************************** Start Message Input Box *************************************** if ($Action == "showForumMessageInputBox" && isset($_SESSION[user])) { ?> "; if (!empty($id) && empty($_GET[edit])) { $forum_title = showTableFieldTwo('FORUM_MESSAGES','title','message_id',$id,'type','1'); $forum_title = "$la_re: $forum_title"; } if (isset($_GET[replyid])) $replyid = $_GET[replyid]; if (isset($_POST[replyid])) $replyid = $_POST[replyid]; if (!empty($_GET[edit]) || !empty($_POST[id])) { $id = $_GET[edit]; if (empty($id)) $id = $_POST[id]; $message_type = showTableField('FORUM_MESSAGES','type','id',$_GET[edit]); $forum_message = showTableField('FORUM_MESSAGES','message','id',$_GET[edit]); $forum_message = stripslashes($forum_message); $forum_message = str_replace(array("\r\n","%0a", "%0d"), '
', $forum_message); $forum_title = showTableField('FORUM_MESSAGES','title','id',$_GET[edit]); } if (isset($_POST[previewMessage])) { $forum_title = $_POST[forum_title]; $forum_message = $_POST[forum_message]; ?>
Smile


> >
:
:
:
:
//Usage: initRTE(imagesPath, includesPath, cssFile) initRTE("htmleditor/images/", "", ""); */ ?>
:mad: :p :o
:confused: ;) :)
:D :( :rolleyes:
:cool: :eek:  
:
 

showForumFooter(); exit; } ******************************************************************************************/ else { ?>
1 LIMIT 1"); else $result3 = mysql_query("SELECT * FROM FORUM_TOPICS WHERE id = '$forum_catid' AND type>2 LIMIT 1"); } else { $result1 = mysql_query("SELECT * FROM FORUM_TOPICS WHERE type = '1' ORDER BY listby ASC"); $result2 = mysql_query("SELECT * FROM FORUM_TOPICS WHERE type = '2' ORDER BY listby ASC"); $result3 = mysql_query("SELECT * FROM FORUM_TOPICS WHERE type = '3' ORDER BY listby ASC"); } if (isset($result1)) $num_res1 = mysql_num_rows($result1); if (isset($result2)) $num_res2 = mysql_num_rows($result2); if (isset($result3)) $num_res3 = mysql_num_rows($result3); if ($user == "employee" && $user != "client" && $user != "visitor") { if (isset($result1)) { while($row = mysql_fetch_array($result1)) { $name = $row["name"]; $catid = $row["id"]; showForumMainThreads($catid); } } } if (($user == "client" || $user == "employee") && $user != "visitor") { if (isset($result2)) { while($row = mysql_fetch_array($result2)) { $name = $row["name"]; $catid = $row["id"]; showForumMainThreads($catid); } } } //Discussion for visitors and everybody else************************** if (isset($result3)) { while($row = mysql_fetch_array($result3)) { $name = $row["name"]; $catid = $row["id"]; showForumMainThreads($catid); } } if ((isset($num_res1) && $num_res1<1) || (isset($num_res2) && $num_res2<1) || (isset($num_res3) && $num_res3<1)) { ?>