• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP executeSelect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中executeSelect函数的典型用法代码示例。如果您正苦于以下问题:PHP executeSelect函数的具体用法?PHP executeSelect怎么用?PHP executeSelect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了executeSelect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: validateDeletion

function validateDeletion($var_list)
{
    global $conn;
    $sql = "select nTicketId from sptbl_tickets where nDeptId IN({$var_list})";
    $rs = executeSelect($sql, $conn);
    if (mysql_num_rows($rs) > 0) {
        return false;
    } else {
        $sqlparentcheck = "select nDeptId from sptbl_depts where nDeptParent IN({$var_list})";
        $rs1 = executeSelect($sqlparentcheck, $conn);
        if (mysql_num_rows($rs1) > 0) {
            return false;
        }
    }
    //check category table
    $sqlcattcheck = "select nDeptId from sptbl_categories where nDeptId IN({$var_list})";
    $rs2 = executeSelect($sqlcattcheck, $conn);
    if (mysql_num_rows($rs2) > 0) {
        return false;
    }
    /*
    		$sqlstaffdeptcheck="select nDeptId from sptbl_staffdept where nDeptId IN ($var_list) ";
    		$rs3 = executeSelect($sqlstaffdeptcheck,$conn);
    		if(mysql_num_rows($rs3)>0){
    		        return false;
    		}  
    */
    return true;
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:29,代码来源:departments.php


示例2: validateDeletion

function validateDeletion($var_list)
{
    global $conn;
    $sql = "Select nTicketId from sptbl_tickets where vStatus !='closed' AND nUserId IN({$var_list}) ";
    if (mysql_num_rows(executeSelect($sql, $conn)) > 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:10,代码来源:users.php


示例3: getSuscriptores

 public function getSuscriptores($ticket)
 {
     $sql = "select * from acsa_tickets_suscripcion where ticket_id='" . mysql_real_escape_string($ticket) . "' and estado='1'";
     $result = executeSelect($sql, $this->conn);
     if (mysql_num_rows($result) > 0) {
         return $result;
     } else {
         return null;
     }
 }
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:10,代码来源:suscripcion.php


示例4: validateDeletion

function validateDeletion($var_list)
{
    global $conn;
    $sql = "Select nCompId from sptbl_depts where nCompId IN({$var_list})";
    if (mysql_num_rows(executeSelect($sql, $conn)) > 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:10,代码来源:companies.php


示例5: hasChildren

function hasChildren($catid)
{
    global $conn;
    $sqlparentcheck = "select nCatId from sptbl_categories where nParentId='" . mysql_real_escape_string($catid) . "'";
    $rs = executeSelect($sqlparentcheck, $conn);
    if (mysql_num_rows($rs) > 0) {
        return true;
    } else {
        return false;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:11,代码来源:kbcategories.php


示例6: validateAddition

function validateAddition($var_list)
{
    global $conn;
    $sql = "Select vLookUpValue from sptbl_lookup where vLookUpName='Attachments' and vLookUpValue='{$var_list}'";
    $var_result = executeSelect($sql, $conn);
    if (mysql_num_rows($var_result) > 0) {
        return false;
    } else {
        return true;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:11,代码来源:attachments.php


示例7: shutdownFunction

function shutdownFunction()
{
    //  echo '<script type="text/javascript">alert("hello!");</script>';
    $sql = " Select * from sptbl_lookup where vLookUpName IN('Post2PostGap','MailFromName','MailFromMail',";
    $sql .= "'MailReplyName','MailReplyMail','Emailfooter','Emailheader','AutoLock','HelpdeskTitle','SMTPSettings','SMTPServer','SMTPPort')";
    $conn = getConnection();
    $result = executeSelect($sql, $conn);
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_array($result)) {
            switch ($row["vLookUpName"]) {
                case "MailFromName":
                    $var_fromName = $row["vLookUpValue"];
                    break;
                case "MailFromMail":
                    $var_fromMail = $row["vLookUpValue"];
                    break;
                case "MailReplyName":
                    $var_replyName = $row["vLookUpValue"];
                    break;
                case "MailReplyMail":
                    $var_replyMail = $row["vLookUpValue"];
                    break;
                case "Emailfooter":
                    $var_emailfooter = $row["vLookUpValue"];
                    break;
                case "Emailheader":
                    $var_emailheader = $row["vLookUpValue"];
                    break;
                case "AutoLock":
                    $var_autoclock = $row["vLookUpValue"];
                    break;
                case "HelpdeskTitle":
                    $var_helpdeskname = $row["vLookUpValue"];
                    break;
            }
        }
    }
    mysql_free_result($result);
    $subject = handleError();
    if ($subject != 0) {
        $Headers = "From: {$var_fromName} <{$var_fromMail}>\n";
        $Headers .= "Reply-To: {$var_replyName} <{$var_replyMail}>\n";
        $Headers .= "MIME-Version: 1.0\n";
        $Headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
        if ($_SESSION["sess_smtpsettings"] == 1) {
            $var_smtpserver = $_SESSION["sess_smtpserver"];
            $var_port = $_SESSION["sess_smtpport"];
            SMTPMail($var_fromMail, '[email protected]', $var_smtpserver, $var_port, 'Error from Staff', $subject);
        } else {
            @mail('[email protected]', 'Error from Staff', $subject, $Headers);
        }
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:53,代码来源:applicationheader.php


示例8: getClientesCompuestosTotvs

/**
 * Trae los clientes compuestos del totvs de la base de datos SQL
 * @param bool $id
 */
function getClientesCompuestosTotvs($codigocc)
{
    $sql = "SELECT * FROM `acsa_totvs_clientes_compuestos` WHERE codigocc = '" . $codigocc . "'";
    $conn = getConnection();
    $result = executeSelect($sql, $conn);
    $clientes = array();
    if (mysql_num_rows($result) > 0) {
        while ($row = mysql_fetch_array($result)) {
            $clientes[] = array('codigocc' => trim($row['codigocc']), 'lojacc' => trim($row['lojacc']), 'codigo' => trim($row['codigo']), 'loja' => trim($row['loja']), 'nombre' => trim(is_blank(utf8_encode(stripslashes(str_replace("'", "", $row['nombre']))))));
        }
    }
    echo json_encode($clientes);
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:17,代码来源:_acsa_ajax.php


示例9: validateAddition

function validateAddition()
{
    global $conn, $var_tid, $var_userid;
    if (trim($_POST["txtComments"]) == "" || trim($_POST["cmbMark"]) <= 0) {
        return false;
    } else {
        $sql = "select nUserId from sptbl_tickets where nTicketId='" . mysql_real_escape_string($var_tid) . "' and nUserId='" . mysql_real_escape_string($var_userid) . "'";
        $rs = executeSelect($sql, $conn);
        if (mysql_num_rows($rs) == 0) {
            return false;
        }
        return true;
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:14,代码来源:editrating.php


示例10: validateAddition

function validateAddition($var_list)
{
    global $conn;
    $arr_check = array("open", "closed", "escalated");
    if (in_array(strtolower(trim($var_list)), $arr_check) == true) {
        return false;
    }
    $sql = "Select vLookUpValue from sptbl_lookup where vLookUpName='ExtraStatus' and vLookUpValue='{$var_list}'";
    $var_result = executeSelect($sql, $conn);
    if (mysql_num_rows($var_result) > 0) {
        return false;
    } elseif (isValidStatus($var_list)) {
        return true;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:15,代码来源:status.php


示例11: isPasswordCorrect

function isPasswordCorrect($password, $userid)
{
    global $conn;
    $sql = "SELECT vPassword FROM sptbl_users  WHERE nUserId = '" . mysql_real_escape_string($userid) . "'";
    $rs = executeSelect($sql, $conn);
    if (mysql_num_rows($rs) != 0) {
        $row = mysql_fetch_array($rs);
        $pass = $row["vPassword"];
        if ($pass == md5($password)) {
            return true;
        } else {
            return false;
        }
    } else {
        return false;
    }
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:17,代码来源:changepassword.php


示例12: cargarHistorial

 public function cargarHistorial($id = false, $ticket = false, $staff = false, $cliente = false, $citacion = false, $view_ticket = false)
 {
     // cargo el historial
     if ($id != false) {
         $sql = "SELECT * FROM acsa_historial WHERE id='{$id}' LIMIT 1";
     }
     if ($ticket != false) {
         $sql = "SELECT * FROM acsa_historial WHERE ticket_id='{$ticket}' LIMIT 1";
     }
     if ($staff != false) {
         $sql = "SELECT * FROM acsa_historial WHERE staff_id='{$staff}' LIMIT 1";
     }
     if ($cliente != false) {
         $sql = "SELECT * FROM acsa_historial WHERE cliente_id='{$cliente}' LIMIT 1";
     }
     if ($citacion != false) {
         $sql = "SELECT * FROM acsa_historial WHERE citacion_id='{$citacion}' LIMIT 1";
     }
     if ($view_ticket != false) {
         $sql = "SELECT * FROM acsa_historial WHERE ticket_id='{$ticket}' AND show_in_ticket='1'";
     }
     $rs = executeSelect($sql, $this->conn);
     if (mysql_num_rows($rs) > 0 and $view_ticket == false) {
         $row = mysql_fetch_array($rs);
         $this->setId($row['id']);
         $this->setClienteId($row['cliente_id']);
         $this->setCitacionId($row['citacion_id']);
         $this->setTicketId($row['ticket_id']);
         $this->setStaffId($row['staff_id']);
         $this->setFecha($row['fecha']);
         $this->setDescripcion($row['descripcion']);
         $this->setShowInTicket($row['show_in_ticket']);
         $this->setDerviado($row['derivado']);
         return true;
     } elseif (mysql_num_rows($rs) > 0 and $view_ticket == true) {
         return $rs;
     } else {
         return false;
     }
 }
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:40,代码来源:historial.php


示例13: validateUpdation

function validateUpdation()
{
    global $conn;
    $returnFlag = "";
    if (trim($_POST["txtLangCode"]) == "" || trim($_POST["txtLangDesc"]) == "") {
        $returnFlag = false;
    } else {
        $sql = "Select vLangCode,vLangDesc from sptbl_lang where\r\n                  vLangCode='" . mysql_real_escape_string($var_langCode) . "' or\r\n                  vLangDesc='" . mysql_real_escape_string($var_langDesc) . "'";
        if (mysql_num_rows(executeSelect($sql, $conn)) > 0) {
            $returnFlag = false;
        } else {
            $returnFlag = true;
        }
    }
    return $returnFlag;
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:16,代码来源:editlang.php


示例14: count

		if($var_year !="" and $var_month !="")	{
		  $datefilter="$var_year"."-"."$var_month";
		}else{
		  $datefilter=date("Y-m");
		}*/
$sql = " select count(*) as cnt from sptbl_tickets where nDeptid in({$lst_dept}) and  dPostDate like '{$datefilter}%' ";
$rs_cnt = executeSelect($sql, $conn);
$row = mysql_fetch_array($rs_cnt);
$totlnum_tickets = $row['cnt'];
mysql_free_result($rs_cnt);
$ticket_status_name = array();
$ticket_value_cnt = array();
$ticket_status_clr = array();
foreach ($status_arr as $key => $value) {
    $sql = " select count(*) as cnt from sptbl_tickets where  dPostDate like '{$datefilter}%' and nDeptid in({$lst_dept}) and vStatus='" . mysql_real_escape_string($value) . "'";
    $rs_cnt = executeSelect($sql, $conn);
    $row = mysql_fetch_array($rs_cnt);
    array_push($ticket_value_cnt, $row['cnt']);
    array_push($ticket_status_name, $value);
    array_push($ticket_status_clr, colorCode());
    mysql_free_result($rs_cnt);
}
?>

<table   border="0" cellpadding="0" cellspacing="3" width="100%" >
      <?php 
if ($totlnum_tickets > 0) {
    ?>
          <tr align="left"  class="toplinks" valign="bottom" > <td colspan=<?php 
    echo count($ticket_value_cnt) * 3;
    ?>
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:31,代码来源:staticsdetail.php


示例15: getConnection

// +----------------------------------------------------------------------+
// | This source file is a part of supportpro supportdesk                 |
// +----------------------------------------------------------------------+
// | Authors: programmer1<[email protected]>                          |
// |          programmer1<[email protected]>                          |
// +----------------------------------------------------------------------+
require_once "./includes/applicationheader.php";
$conn = getConnection();
$sql1 = "UPDATE sptbl_staffs  ";
$sql1 .= " SET vOnline = '0' WHERE nStaffId = '" . $_SESSION['sess_staffid'] . "' ";
$result1 = executeSelect($sql1, $conn);
/*Added by Amaldev for Livechat*/
$sqlu = "UPDATE sptbl_chat SET vStatus = 'finished', dTimeEnd = now() WHERE nStaffId = '" . $_SESSION['sess_staffid'] . "' and vStatus != 'finished' ";
$resultu = executeSelect($sqlu, $conn);
$sqls = "UPDATE sptbl_operatorchat SET vStatus = 'finished', dTimeEnd=now() WHERE (nFirstStaffId = '" . $_SESSION['sess_staffid'] . "' || nSecondStaffId = '" . $_SESSION['sess_staffid'] . "' ) and vStatus != 'finished' ";
$results = executeSelect($sqls, $conn);
$_SESSION['sess_staffid'] = "";
$_SESSION['sess_staffname'] = "";
$_SESSION['sess_staffemail'] = "";
$_SESSION['sess_stafffullname'] = "";
$_SESSION["sess_isadmin"] = "";
$_SESSION["sess_cssurl"] = "";
$_SESSION["sess_abackreplyurl"] = "";
//session_unregister('sess_abackreplyurl');
unset($_SESSION['sess_abackreplyurl']);
//session_unregister('sess_cssurl');
unset($_SESSION['sess_cssurl']);
//session_unregister('sess_staffid');
unset($_SESSION['sess_staffid']);
//session_unregister('sess_staffname');
unset($_SESSION['sess_staffname']);
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:logout.php


示例16: applyMessagerule

function applyMessagerule($ticket_id)
{
    global $conn;
    $sqlTickets = "Select t.vTitle,t.tQuestion,r.* from sptbl_tickets t left join sptbl_rules r on t.nDeptId = r.nDeptId where t.nTicketId='" . $ticket_id . "'";
    $resultTickets = executeSelect($sqlTickets, $conn);
    if (mysql_num_rows($resultTickets) > 0) {
        $array_title = array();
        $array_question = array();
        $array_searchwords = array();
        $staffprobability = array();
        while ($row = mysql_fetch_array($resultTickets)) {
            $title = $row['vTitle'];
            $question = $row['tQuestion'];
            $rulename = $row['vRuleName'];
            $searchwords = $row['vSearchWords'];
            $staffid = $row['nStaffId'];
            $array_title = explode(" ", $title);
            $array_question = explode(" ", $question);
            $array_searchwords = explode(",", $searchwords);
            $totalvaluesintitle = count($array_title);
            $totalprobability_selectedrow = 0;
            foreach ($array_searchwords as $searchkey => $searchword) {
                $countof_searchword = 0;
                foreach ($array_title as $tilekey => $titlevalue) {
                    if (strcasecmp($searchword, $titlevalue) == 0) {
                        $countof_searchword++;
                    }
                }
                $probabilityindividual = $countof_searchword / $totalvaluesintitle;
                $totalprobability_selectedrow = $totalprobability_selectedrow + $probabilityindividual;
            }
            $staffprobability[$staffid] = $totalprobability_selectedrow;
        }
        // while loop
        $copy_array = $staffprobability;
        sort($copy_array);
        $arr_count = count($staffprobability);
        $max_value = $copy_array[$arr_count - 1];
        foreach ($staffprobability as $key => $value) {
            if ($max_value == $value && $value != 0) {
                $staff_id = $key;
                $point = $value;
            }
        }
        if ($point > 0 && $staff_id != '') {
            $sql = "Update sptbl_tickets set  nOwner='" . $staff_id . "' Where nTicketId='" . mysql_real_escape_string($ticket_id) . "' ";
            executeQuery($sql, $conn);
        }
    }
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:50,代码来源:saveticket.php


示例17: executeSelect

            <h3><?php 
echo TEXT_KNOWLEDGEBASE;
?>
</h3>
        </div>

        <div class="content_section">
            <div class="content_section_data">
                <?php 
if ($error) {
    echo "<div class='msg_error'>" . $errormessage . "</div>";
}
$sql_rate_exist = "SELECT sKBRId FROM  sptbl_kb_rating WHERE nKBID='{$kbid}' AND nUserId='" . $_SESSION['sess_userid'] . "'";
$res_rate_exist = executeSelect($sql_rate_exist, $conn);
$sql_rating = "Select SUM(nMarks) as Rating, count(*) as TotalRatings from  sptbl_kb_rating where nKBID = '" . $kbid . "' GROUP BY nKBID ";
$rs_rating = executeSelect($sql_rating, $conn);
if (mysql_num_rows($rs_rating) > 0) {
    $row_rating = mysql_fetch_array($rs_rating);
    $avgrating = ceil($row_rating['Rating'] / $row_rating['TotalRatings']);
}
if (mysql_num_rows($res_rate_exist) > 0) {
    ?>
                    <b><?php 
    echo htmlentities($title);
    ?>
</b>
                    <!--span class='rating_<?php 
    //echo $avgrating
    ?>
'></span-->
                    <br><br>
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:31,代码来源:viewkbentry.php


示例18: elseif

            if ($row['rpuserid'] > 0) {
                $lastanswerd = TEXT_LAU;
            }
        }
        $classcount++;
        // alarma vencida
        if ($row['alarmaFecha'] != '0000-00-00 00:00:00' and $row['alarmaFecha'] <= date('Y-m-d H:i:s')) {
            $color_tr = ' tr_r2';
        } elseif ($classcount % 2 == 0) {
            $color_tr = ' tr_r1';
        } else {
            $color_tr = ' tr_r0';
        }
        // propiedad
        $sql_prop = "select * from acsa_totvs_propiedades where codigo='" . mysql_real_escape_string($row["propiedad_id"]) . "' limit 1";
        $result_prop = executeSelect($sql_prop, $conn);
        $propiedad = mysql_fetch_array($result_prop);
        $Viewersarray = explode(',', $row["vViewers"]);
        if (in_array($var_staffid, $Viewersarray)) {
            $viewedClass = 'readTK';
        } else {
            $viewedClass = 'unreadTK';
        }
        ?>

                                    <tr class="<?php 
        echo $viewedClass . $color_tr;
        ?>
">
                                        <td class="text-center" width="3%">
                                            <?php 
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:ticketsassigned.php


示例19: mysql_query

<?php

//print_r($_SESSION);
$kbsql = "SELECT nKBID FROM sptbl_kb skb INNER JOIN sptbl_categories spc ON spc.nCatId=skb.nCatId INNER JOIN sptbl_depts spd ON\r\n    spd.nDeptId=spc.nDeptId INNER JOIN sptbl_staffdept ssdp ON ssdp.nDeptId=spd.nDeptId WHERE ssdp.nStaffId=" . $_SESSION['sess_staffid'];
$kbcount = mysql_query($kbsql);
$kbcount = mysql_num_rows($kbcount);
$sql_ticket_details = "SELECT count(nTicketId) AS  todaysticketcount,\r\n                     (SELECT count(nTicketId) FROM sptbl_tickets\r\n                     WHERE date_format(dPostDate,'%Y-%m-%d')>=(CURDATE() - INTERVAL 3 DAY)  AND nDeptId\r\n                     IN(SELECT nDeptId FROM sptbl_staffdept WHERE nStaffId='" . $_SESSION['sess_staffid'] . "')\r\n                     AND vStatus!='closed')\r\n                     AS last3daysticketcount,\r\n                     (SELECT count(nTicketId) FROM sptbl_tickets\r\n                     WHERE date_format(dPostDate,'%Y-%m-%d')>=(CURDATE() - INTERVAL 10 DAY)  AND nDeptId\r\n                     IN(SELECT nDeptId FROM sptbl_staffdept WHERE nStaffId='" . $_SESSION['sess_staffid'] . "')\r\n                     AND vStatus!='closed')\r\n                     AS last10daysticketcount,\r\n                     (SELECT count(Distinct(nTicketId))\r\n                     FROM  sptbl_replies\r\n                     WHERE nStaffId='" . $_SESSION['sess_staffid'] . "'\r\n                     AND date_format(dDate,'%Y-%m-%d')=CURDATE() )\r\n                     AS repliedCount \r\n                     FROM sptbl_tickets\r\n                     WHERE date_format(dPostDate,'%Y-%m-%d')=CURDATE()\r\n                      AND nDeptId\r\n                     IN(SELECT nDeptId FROM sptbl_staffdept WHERE nStaffId='" . $_SESSION['sess_staffid'] . "')\r\n                     AND vStatus!='closed'";
$res_ticket_details = executeSelect($sql_ticket_details, $conn);
$row_ticket_details = mysql_fetch_array($res_ticket_details);
//echo"<pre>";print_r($row_ticket_details);echo"</pre>";
?>
          
<div class="left_item_block">
    <div class="left_item_title"><?php 
echo TEXT_FIELDS_DATA_ENTRIES;
?>
</div>
    <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="list_tbl">
        <tr>
            <td bgcolor="#FFFFFF" width="74%"><?php 
echo TEXT_TICKETS;
?>
</td><td width="26%" bgcolor="#FFFFFF"><?php 
echo "<b>" . $tot_tickets . "</b>";
?>
</td>
        </tr>
        <tr>
            <td bgcolor="#FFFFFF" width="74%"><?php 
echo TEXT_KNOWLEDGE_BASE;
?>
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:31,代码来源:dataentries.php


示例20: validateSave

function validateSave($var_tid)
{
    global $conn;
    global $curr_status, $mail_refno;
    $var_message = "1";
    if (trim($_POST['txtRpMatter']) == "" or trim($_POST['txtTimeSpent']) <= 0) {
        $var_message = "<font color=red>" . MESSAGE_RECORD_EMPTY_MATTER_ERROR . "</font>";
        return $var_message;
    }
    $sql = "select nDeptid,nOwner,nLockStatus,vTitle,nUserId,tQuestion,vStatus,vRefNo from sptbl_tickets where nTicketId='" . mysql_real_escape_string($var_tid) . "'";
    $sql .= " and vDelStatus='0'";
    $result = executeSelect($sql, $conn);
    if (mysql_num_rows($result) > 0) {
        $var_row = mysql_fetch_array($result);
        $var_deptid = $var_row["nDeptid"];
        $var_tickettitle = $var_row["vTitle"];
        $var_userid = $var_row["nUserId"];
        $var_replymatter = $var_row["tQuestion"];
        $var_owner = $var_row["nOwner"];
        $var_lockstatus = $var_row["nLockStatus"];
        $var_status = $var_row["vStatus"];
        $curr_status = $var_status;
        $mail_refno = $var_row["vRefNo"];
        mysql_free_result($result);
        $sql = " select  nStaffId,nDeptId from sptbl_staffdept where nStaffId='" . mysql_real_escape_string($_SESSION["sess_staffid"]) . "'";
        $sql .= " and nDeptId='" . mysql_real_escape_string($var_deptid) . "'";
        $result = executeSelect($sql, $conn);
        //check valid department
        if (mysql_num_rows($result) == 0) {
            $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR_DEPT . "</font>";
        } else {
            if ($var_lockstatus == "1") {
                if ($var_owner == "0") {
                    $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR_NO_OWNER . "</font>";
                } else {
                    if ($_POST['chktkowner'] == "tkowner" and $_SESSION["sess_staffid"] != $var_owner) {
                        $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR_ALREADY_OWNED_USER . "</font>";
                    } else {
                        if ($_POST['chklock'] == "lock" and $_SESSION["sess_staffid"] != $var_owner) {
                            $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR_ALREADY_LOCKED_ANOTHER_USER . "</font>";
                        } else {
                            if ($_SESSION["sess_staffid"] != $var_owner) {
                                $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR_LOCKED_ANOTHER_USER . "</font>";
                            }
                        }
                    }
                }
            } else {
                if ($var_lockstatus == "0") {
                    if ($_POST['chktkowner'] == "tkowner" and $_POST['chklock'] == "lock") {
                    } else {
                        if ($_POST['chklock'] == "lock" and $_SESSION["sess_staffid"] != $var_owner and $var_owner != "0") {
                            $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR_DIFFENT_OWNER . "</font>";
                        }
                    }
                }
            }
        }
    } else {
        $var_message = "<font color=red>" . MESSAGE_RECORD_ERROR . "</font>";
    }
    return $var_message;
}
开发者ID:ACSAUruguay,项目名称:helpdesk,代码行数:63,代码来源:replies.php.BASE.php



注:本文中的executeSelect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP executeSql函数代码示例发布时间:2022-05-15
下一篇:
PHP executeSQL函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap