> <?php echo $var_message; ?> </div></td> </tr> <tr><td colspan="3"> </td></tr> <tr> <td width="13%" align="left"> </td> <td width="26%" align="left" class="toplinks" valign="top"><?php echo TEXT_TO; ?> <font style="color:#FF0000; font-size:9px">*</font> </td> <td width="61%" align="left"> <?php $staffcompanies = getStaffCompanies($_SESSION["sess_staffid"]); $ddl = ""; if (isNotNull($staffcompanies)) { echo "<select name=\"ddlEmails[]\" id=\"ddlEmail\" class=\"comm_input input_width1a\" style=\"width:300px; height:60px!important;\" MULTIPLE size=\"10\">"; $var_listnew = makeEmailList($staffcompanies); if (count($var_listnew) > 0) { foreach ($var_listnew as $key => $value) { $ddl .= "<option value=\"{$key}\""; if ($ddlEmails == "{$key}") { $ddl .= " selected=\"selected\""; } $ddl .= ">" . $value . "</option>\n"; } echo $ddl; } echo "</select>";
} else { $sql = "Select nCompId from sptbl_companies where vDelStatus='0' AND nCompId='" . mysql_real_escape_string($_POST["cmbCompanyId"]) . "' "; if (mysql_num_rows(executeSelect($sql, $conn)) <= 0) { return false; } else { $sql = "Select nUserId from sptbl_users where vLogin='******' AND nUserId != '" . mysql_real_escape_string($var_id) . "'"; if (mysql_num_rows(executeSelect($sql, $conn)) > 0) { return false; } } } return true; } $lst_comp = ""; //fill the css ids here $sql = "Select nCompId,vCompName from sptbl_companies where (vDelStatus='0') and (nCompId IN (" . getStaffCompanies($_SESSION["sess_staffid"]) . ")) order by vCompName "; $result = executeSelect($sql, $conn); while ($row = mysql_fetch_array($result)) { $lst_comp .= "<option value=\"" . $row["nCompId"] . "\"" . ($var_compId == $row["nCompId"] ? "Selected" : "") . ">" . htmlentities($row["vCompName"]) . "</option>"; } mysql_free_result($result); //end of fill the css ids here ?> <form name="frmCannedmessage" method="POST" action="<?php echo $_SERVER["REQUEST_URI"]; ?> "> <div class="content_section"> <div class="content_section_title"> <h3><?php echo TEXT_ADD_CANNEDMESSAGE;
$var_start = $_GET["start"]; $var_begin = $_GET["begin"]; $var_num = $_GET["num"]; $var_styleminus = $_GET["styleminus"]; $var_stylename = $_GET["stylename"]; $var_styleplus = $_GET["styleplus"]; } elseif ($_POST["mt"] == "y") { $var_numBegin = $_POST["numBegin"]; $var_start = $_POST["start"]; $var_begin = $_POST["begin"]; $var_num = $_POST["num"]; $var_styleminus = $_POST["styleminus"]; $var_stylename = $_POST["stylename"]; $var_styleplus = $_POST["styleplus"]; } $sql = "SELECT u.nUserId,u.vUserName,c.vCompName,u.vOnline,u.ddate,u.vOnline,u.vBanned ,u.vLogin\r\n\t\tFROM \r\n\t\tsptbl_users u INNER JOIN sptbl_companies c on u.nCompId=c.nCompId \r\n\t\tWHERE (u.vDelStatus='0') and (c.nCompId IN (" . getStaffCompanies($_SESSION["sess_staffid"]) . ")) "; $qryopt = ""; if ($_POST["txtSearch"] != "") { $var_search = $_POST["txtSearch"]; } else { if ($_GET["txtSearch"] != "") { $var_search = $_GET["txtSearch"]; } } if ($_POST["cmbSearch"] != "") { $var_cmbSearch = $_POST["cmbSearch"]; } else { if ($_GET["cmbSearch"] != "") { $var_cmbSearch = $_GET["cmbSearch"]; } }