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

PHP updateLog函数代码示例

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

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



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

示例1: isset

        isset($_POST['dependance']) && $_POST['dependance'] != '' ? $dependance = trim($_POST['dependance']) : ($dependance = '');
        //SQL
        $sql = "UPDATE `groupelocalite` SET `ID_GRPLOC`='" . addslashes($codegrplocalite) . "' ,`GRPLOC_LIBELLE`='" . addslashes($grplocalite) . "' ,`GRPLOC_LIEN`='" . addslashes($dependance) . "'  WHERE ID_GRPLOC LIKE '" . addslashes($oldcodegrplocalite) . "'";
        try {
            $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
            //Connexion to database
        } catch (PDOException $error) {
            //Treat error
            //("Erreur de connexion : " . $error->getMessage() );
            header('location:errorPage.php');
        }
        $query = $cnx->prepare($sql);
        //Prepare the SQL
        $query->execute();
        //Execute prepared SQL => $query
        updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Ajout d\'un type de localité (' . $codegrplocalite . ', ' . $grplocalite . ')');
        //updateLog($username, $idcust, $action='' )
        header('location:grplocalite.php?selectedTab=par&rst=1');
        break;
    default:
        ///Nothing
        //header('location:../index.php');
}
isset($_POST['myaction']) && $_POST['myaction'] != '' ? $myaction = $_POST['myaction'] : ($myaction = '');
switch ($myaction) {
    case 'edit':
        isset($_POST['rowSelection']) ? $id = $_POST['rowSelection'][0] : ($id = '');
        $split = preg_split('/ /', $id);
        try {
            $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
            //Connexion to database
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbgrplocalite.php


示例2: PDO

     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     //TRANSFERT
     $sql = "UPDATE `transfert` SET  TRS_VALIDE=2 WHERE `ID_TRANSFERT` = '" . addslashes($xid) . "';\r\n\t\tUPDATE mouvement SET MVT_VALID=2 WHERE (MVT_NATURE LIKE 'TRANSFERT SORTANT' OR MVT_NATURE LIKE 'TRANSFERT ENTRANT')\r\n\t\tAND ID_SOURCE='" . addslashes($xid) . "';";
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     $row = $query->fetch(PDO::FETCH_ASSOC);
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Annulation d\'un transfert (' . $xid . ', ' . $reftransfert . ')');
     //updateLog($username, $idcust, $action='' )
     //echo $sql;
     header('location:transfert.php?selectedTab=bds&rst=1');
     break;
 case 'validate':
     isset($_POST['rowSelection']) ? $id = $_POST['rowSelection'][0] : ($id = '');
     $split = preg_split('/@/', $id);
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbtransfert.php


示例3: header

            //Treat error
            //("Erreur de connexion : " . $error->getMessage() );
            header('location:errorPage.php');
        }
        $query = $cnx->prepare($sql);
        //Prepare the SQL
        $query->execute();
        //Execute prepared SQL => $query
        updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Ajout d\'une nature (' . $codenature . ', ' . $nature . ')');
        //updateLog($username, $idcust, $action='' )
        header('location:naturemvt.php?selectedTab=par&rs=1');
        break;
        //Log out user
    //Log out user
    case 'logout':
        updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Déconnexion du système échouée');
        //updateLog($username, $idcust, $action='' )
        header('location:../index.php');
        break;
    default:
        ///Nothing
        header('location:../index.php');
}
/*
switch($myaction){

	case 'ETAPE2':
		$table1 = "stocks_compte";
		$table2 = "stocks_groupe";
		$table3 = "stocks_personnel";
		$table4 = "stocks_exercice";
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbnaturemvt.php


示例4: addslashes

                $sql = "INSERT INTO `infogenerale` (CODE_INFGLE, CODE_MAGASIN, ID, `INF_CLIENT`, `INF_DATEACQ`, `INF_LICENCE`, `INF_MINISTERE`, `INF_SECRETARIAT`, `INF_DIRECTION`, `INF_SERVICE`,`INF_CSPS`, `INF_PAYS`, `INF_DEVISE`, `INF_VILLE`, `LOGO`,\r\n\t\t\t`INF_SIGNATEUR1`, `INF_NOMSIGNATEUR1`, `INF_SIGNATEUR2`, `INF_NOMSIGNATEUR2`, `INF_SIGNATEUR3`, `INF_NOMSIGNATEUR3`,`INF_SIGNATEUR4`, `INF_NOMSIGNATEUR4`, `INF_VALIDAUTO`, `INF_MAGASIN`)\r\n\t\t\tVALUES ('" . addslashes("{$id}/{$magasin}") . "', '" . addslashes($magasin) . "',  '" . addslashes($id) . "', '" . addslashes($client) . "', '" . addslashes($dateacq) . "', '" . addslashes($licence) . "' , '" . addslashes($ministere) . "' ,'" . addslashes($secretariat) . "' ,\r\n\t\t\t'" . addslashes($direction) . "','" . addslashes($service) . "','" . addslashes($csps) . "','" . addslashes($pays) . "','" . addslashes($devise) . "', '" . addslashes($ville) . "',\r\n\t\t\t'" . addslashes($logo) . "', '" . addslashes($signateur1) . "', '" . addslashes($nomsignateur1) . "', '" . addslashes($signateur2) . "', '" . addslashes($nomsignateur2) . "',\r\n\t\t\t'" . addslashes($signateur3) . "','" . addslashes($nomsignateur3) . "','" . addslashes($signateur4) . "','" . addslashes($nomsignateur4) . "','" . addslashes($validauto) . "','" . addslashes($magasin) . "');";
            }
            try {
                $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
                //Connexion to database
            } catch (PDOException $error) {
                //Treat error
                //("Erreur de connexion : " . $error->getMessage() );
                header('location:errorPage.php');
            }
            $query = $cnx->prepare($sql);
            //Prepare the SQL
            $query->execute();
            //Execute prepared SQL => $query
            //echo  $sql;
            updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Ajout ou modification des paramètres généraux');
            //updateLog($username, $idcust, $action='' )
            header('location:generale.php?selectedTab=par');
            break;
        default:
            ///Nothing
    }
} elseif ($myaction != '') {
    //myaction
    switch ($myaction) {
        default:
            ///Nothing
            //header('location:../index.php');
    }
} elseif ($myaction == '' && ($do = '')) {
    header('location:../index.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbgenerale.php


示例5: PDO

     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     //LIVRAISON
     $sql = "UPDATE `livraison` SET  LVR_VALIDE=2 WHERE `ID_LIVRAISON` = '" . addslashes($xid) . "';\r\n\t\tUPDATE mouvement SET MVT_VALID=2 WHERE (MVT_NATURE LIKE 'LIVRAISON')\r\n\t\tAND ID_SOURCE='" . addslashes($xid) . "';";
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     $row = $query->fetch(PDO::FETCH_ASSOC);
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Annulation d\'une livraison (' . $xid . ', ' . $oldcode . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:livraison.php?selectedTab=bde&rst=1');
     break;
 case 'validate':
     isset($_POST['rowSelection']) ? $id = $_POST['rowSelection'][0] : ($id = '');
     $split = preg_split('/@/', $id);
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     //COMMANDE
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dblot.php


示例6: updateLog

     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'une région (' . $region . ')');
     //updateLog($username, $idcust, $action='' )
     unset($GLOBALS['DATA_REG']);
     header('location:region.php?selectedTab=par&rs=2');
     break;
     //SEARCH CATEGORIE
 //SEARCH CATEGORIE
 case 'search':
     $where = "";
     isset($_POST['region']) && $_POST['region'] != '' ? $region = trim($_POST['region']) : ($region = '');
     if ($where != '') {
         $where = substr($where, 0, strlen($where) - 4);
     }
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Ajout d\'une région (' . $codecategorie . ', ' . $categorie . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:region.php?selectedTab=par&rst=1');
     break;
 case 'check':
     $msg = "";
     isset($_POST['codecategorie']) && $_POST['codecategorie'] != '' ? $codecategorie = trim($_POST['codecategorie']) : ($codecategorie = '');
     if ($codecategorie != '') {
         $sql = "SELECT COUNT(CODE_CATEGORIE) AS NBRE FROM  `categorie` WHERE `CODE_CATEGORIE` LIKE '" . addslashes($codecategorie) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
             header('location:errorPage.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbregion.php


示例7: isset

     isset($_POST['souscategorie']) && $_POST['souscategorie'] != '' ? $souscategorie = trim($_POST['souscategorie']) : ($souscategorie = '');
     //SQL
     $sql = "UPDATE `souscategorie` SET `CODE_SOUSCATEGORIE`='" . addslashes($codesouscategorie) . "' ,\r\n\t\t `CODE_CATEGORIE`='" . addslashes($categorie) . "' ,`SOUSCAT_LIBELLE`= '" . addslashes($souscategorie) . "'\r\n\t\t WHERE CODE_SOUSCATEGORIE LIKE '" . addslashes($oldsouscodecategorie) . "'";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'une sous-catégorie (' . $oldsouscodecategorie . ', ' . $categorie . ' - ' . $souscategorie . ')');
     //updateLog($username, $idcust, $action='' )
     unset($GLOBALS['DATA_CAT']);
     header('location:souscategorie.php?selectedTab=par&rs=2');
     break;
 case 'check':
     $msg = "";
     isset($_POST['codesouscategorie']) && $_POST['codesouscategorie'] != '' ? $codecategorie = trim($_POST['codesouscategorie']) : ($codecategorie = '');
     if ($codecategorie != '') {
         $sql = "SELECT COUNT(CODE_CATEGORIE) AS NBRE FROM  `souscategorie` WHERE `CODE_SOUSCATEGORIE` LIKE '" . addslashes($codecategorie) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbsouscategorie.php


示例8: mysqlFormat

     $dateintegration = mysqlFormat($dateintegration);
     //SQL
     $sql = "UPDATE `beneficiaire` SET `CODE_TYPEBENEF`='" . addslashes($typebeneficiaire) . "' ,`CODE_BENEF`='" . addslashes($codebeneficiaire) . "' ,`BENEF_NOM`='" . addslashes($beneficiaire) . "' ,\r\n\t\t`BENEF_EBREVIATION`='" . addslashes($abbrege) . "' ,`BENEF_TEL`='" . addslashes($tel) . "' ,`BENEF_VILLE`='" . addslashes($ville) . "' ,\r\n\t\t`BENEF_EMAIL`='" . addslashes($email) . "',`IDPROVINCE`='" . addslashes($province) . "'  WHERE CODE_BENEF LIKE '" . addslashes($oldcodebeneficiaire) . "' ";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'un bénéficiaire (' . $codebeneficiaire . ', ' . $beneficiaire . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:beneficiaire.php?selectedTab=par&rs=2');
     break;
 case 'check':
     $msg = "";
     isset($_POST['code']) && $_POST['code'] != '' ? $code = trim($_POST['code']) : ($code = '');
     if ($code != '') {
         $sql = "SELECT COUNT(CODE_BENEF) AS NBRE FROM  `beneficiaire` WHERE `CODE_BENEF` = '" . addslashes($code) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
             header('location:errorPage.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbbeneficiaire.php


示例9: isset

     isset($_POST['email']) && $_POST['email'] != '' ? $email = trim($_POST['email']) : ($email = '');
     //SQL
     $sql = "UPDATE  `magasin` SET `CODE_MAGASIN`='" . addslashes($codeservice) . "' ,`IDPROVINCE`='" . addslashes($province) . "' ,\r\n\t  \t`SER_NOM`= '" . addslashes($service) . "',`SER_EMAIL`='" . addslashes($email) . "' ,`SER_TEL`='" . addslashes($telephone) . "' ,\r\n\t  \t`SER_VILLE`='" . addslashes($ville) . "'  WHERE CODE_MAGASIN LIKE '" . addslashes($oldcodeservice) . "'";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Ajout d\'un service (' . $codeservice . ', ' . $service . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:service.php?selectedTab=par&rs=2');
     break;
 case 'check':
     $msg = "";
     isset($_POST['code']) && $_POST['code'] != '' ? $code = trim($_POST['code']) : ($code = '');
     if ($code != '') {
         $sql = "SELECT COUNT(CODE_MAGASIN) AS NBRE FROM  `magasin` WHERE `CODE_MAGASIN` LIKE '" . addslashes($code) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
             header('location:errorPage.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbservice.php


示例10: isset

     isset($_POST['natdeclassement']) && $_POST['natdeclassement'] != '' ? $natdeclassement = trim($_POST['natdeclassement']) : ($natdeclassement = '');
     //SQL
     $sql = "UPDATE `natdeclass` SET `CODENATDECLASS`='" . addslashes($codenatdeclassement) . "' ,`LIBNATDECLASS`= '" . addslashes($natdeclassement) . "' WHERE CODENATDECLASS LIKE '" . addslashes($oldcodenatdeclassement) . "'";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'une nature declassement (' . $oldcodenatdeclassement . ', ' . $codenatdeclassement . ', ' . $natdeclassement . ')');
     //updateLog($username, $idcust, $action='' )
     unset($GLOBALS['DATA_CAT']);
     header('location:natdeclassement.php?selectedTab=par&rs=2');
     break;
     //SEARCH CATEGORIE
 //SEARCH CATEGORIE
 case 'check':
     $msg = "";
     isset($_POST['code']) && $_POST['code'] != '' ? $code = trim($_POST['code']) : ($code = '');
     if ($code != '') {
         $sql = "SELECT COUNT(CODENATDECLASS) AS NBRE FROM  `natdeclass` WHERE `CODENATDECLASS` LIKE '" . addslashes($code) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbnatdeclassement.php


示例11: isset

     isset($_POST['id']) && $_POST['id'] != '' ? $id = trim($_POST['id']) : ($id = '');
     //SQL
     $sql = "UPDATE `benefmag` SET `ID_BENEF`='" . addslashes($beneficiaire) . "' ,`CODE_MAGASIN`='" . addslashes($magasin) . "' ,`BM_DATEDEBUT`='" . addslashes($datedebut) . "' ,`BM_DATEFIN`='" . addslashes($datefin) . "'  WHERE ID_BENMAG={$id}";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'une affectation (' . $beneficiaire . ', ' . $magasin . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:affectation.php?selectedTab=par&rs=2');
     break;
 case 'detail':
     isset($_GET['xid']) ? $id = $_GET['xid'] : ($id = '');
     $_SESSION['DATA_DON'] = DataDonneesAnnuelles("ID_EXERCICE={$id}", $_SESSION['GL_USER']['MAGASIN']);
     //		$sql = "SELECT * FROM  `donnee_annuelle` INNER JOIN beneficiaire ON (beneficiaire.ID_BENEF=donnee_annuelle.ID_BENEF)
     //			WHERE CODE_MAGASIN LIKE '".$_SESSION['GL_USER']['MAGASIN']."' AND ID_EXERCICE=".$_SESSION['GL_USER']['EXERCICE']."
     //			ORDER BY BENEF_NOM ASC;";
     //
     //		try {
     //			$cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); //Connexion to database
     //		}
     //		catch (PDOException $error) { //Treat error
     //			//("Erreur de connexion : " . $error->getMessage() );
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbdonnees.php


示例12: define

define("SEND_DAILY_EMAIL", true);
// Send daily notification summary to Email
define("SEND_DAILY_SLACK", true);
// Send daily notification summary to Slack
define("STATUS_SOURCE", "status.log");
// Status Log File
/* End Config */
$data = csvToArray();
$result = prepareRunGoogle($data);
if (SEND_TO_EMAIL) {
    resultsToEmail($result);
}
if (SEND_TO_SLACK) {
    resultsToSlack($result);
}
updateLog($data, $result);
function csvToArray()
{
    if (!file_exists(CSV_SOURCE) || !is_readable(CSV_SOURCE)) {
        // Check source and email error if issue occurs
        mail(TO_EMAIL, 'CSV Unreadable', 'Warning - URL Status Checker CSV "' . CSV_SOURCE . '" is unreadable/not found.');
    }
    // Save data to array $data
    $header = NULL;
    $data = array();
    if (($handle = fopen(CSV_SOURCE, 'r')) !== FALSE) {
        while (($row = fgetcsv($handle, 1000, CSV_DELIMITER)) !== FALSE) {
            if (!$header) {
                $header = $row;
            } else {
                $data[] = array_combine($header, $row);
开发者ID:torican,项目名称:URL-Status-Checker,代码行数:31,代码来源:index.php


示例13: PDO

     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     //TRANSFERT
     $sql = "UPDATE `commande` SET  CDE_STATUT=2 WHERE `CODE_COMMANDE` LIKE '" . addslashes($xid) . "';";
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     $row = $query->fetch(PDO::FETCH_ASSOC);
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Annulation d\'une commande (' . $xid . ', ' . $oldrefcommande . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:commande.php?selectedTab=bde&rst=1');
     break;
 case 'validate':
     isset($_POST['rowSelection']) ? $id = $_POST['rowSelection'][0] : ($id = '');
     $split = preg_split('/@/', $id);
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     //COMMANDE
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbcommande.php


示例14: parseData


//.........这里部分代码省略.........
	
					# Parse the results & loop through each item
					$divLocation3 = strpos($result3, '<div id="ctl00_ContentPlaceHolder1_pnlViolationDetails"');
					$pos3 = substr($result3, $divLocation3, strpos($result3, '</div>', $divLocation3) - $divLocation3);
					$htmldata3 = str_get_html('<html><body>'.$pos3.'</body></html>');
					$skip3 = false;
					foreach($htmldata3->find('tr') as $row3)
					{				
						# Skip any header rows	
						if ($row3->class == "inspectionTableHeader")
						{
							continue;
						}	
						
						# Grab our data for all normal rows
						if (isset($row3->childNodes(2)->innertext))
						{						
							//severity can be critical, noncritical, satisfactory
							$severity = strip_tags($row3->childNodes(0)->innertext);
							$desc = $row3->childNodes(1)->innertext;
							$resultText = $row3->childNodes(2)->innertext;
								
							# Testing
							echo 'Severity:'.$severity.'<br />';
							echo 'Desc:'.$desc.'<br />';
							echo 'Res:'.$resultText.'<br />';
							echo '<br />';
	
							$details = '';
							$category = '';
							
							if ($desc != '')
							{
								$desc = strip_tags($desc);
								$failPos = stripos($desc, 'Fail');
								$category = substr($desc, 0, $failPos);
								$details = substr($desc, $failPos, strlen($desc));
							}
														
							# Update details in db
							updateInspection($location_id, $inspectionDate, $severity, $resultText, $details, $category, $inspected);
						}
						else
						{						
							// Do we have an order 13?
							$text = $row3->childNodes(0)->innertext;
							if (strpos(strtolower($text), 'section 13 order served') !== FALSE)
							{
								echo 'Order 13 Served!<br />';
								
								// We found an Order 13 - so lets capture that information
								updateInspection($location_id, $inspectionDate, 'Closed', 'No', strip_tags($text), 'Order 13 Served', $inspected);
							}
							else if (strpos(strtolower($text), 'section 13 order revoked') !== FALSE)
							{
								echo 'Order 13 Revoked!<br />';
																
								// We found an Order 13 - so lets capture that information
								updateInspection($location_id, $inspectionDate, 'Closed', 'No', strip_tags($text), 'Order 13 Revoked', $inspected);
							}
							else
							{
								echo 'No infractions - record note!<br />';
								
								// We record a simple note as there was no infractions
								updateInspection($location_id, $inspectionDate, 'Note', 'No', ' ', strip_tags($text), $inspected);
							}
						}
					}
					$htmldata3->clear();
					unset($htmldata3);
	
					# Only process one inspection
					///break; Process all inspections - Aug. 5, 2010 - rtraction djm
				}
				
				$htmldata2->clear();
				unset($htmldata2);			
			}
		}
		
		# We've hit our timelimit above so we want to break out
		if ($break) { break; }
	}
	$html->clear();
	unset($html);

	// updated log table
	if (!$break)
	{
		updateLog();
	}
	else
	{
		# We hit a time block above and broke out of our loops
		# We're starting the process again but jumping ahead
		
		parseData($i);
	}
}
开发者ID:rtraction,项目名称:Eat-Sure,代码行数:101,代码来源:update.php


示例15: processCheckIn

function processCheckIn($rfid)
{
    $errors = 0;
    $processCheckInMessage = "";
    $rfid = testInput($rfid);
    $date = date('Y-m-d H:i:s');
    if (getMemberInfoByRFID($rfid, 'k.serial')["serial"] != null) {
        if (getMemberInfoByRFID($rfid, "c.active")["active"] == 0) {
            // check if user is active
            if (!createLog(getMemberInfoByRFID($rfid, "c.cid")["cid"], $date)) {
                // create a log with the current date
                $errors = 1;
                $processCheckInMessage .= 'Could not create a new log in the database!';
                die;
            } else {
                if (!updateContactCheckinStatus($date, getMemberInfoByRFID($rfid, "c.cid")["cid"], 1)) {
                    // update user table, set active to 1 and insert last checkin time
                    $errors = 1;
                    $processCheckInMessage .= 'Could not update member status when checking in!';
                    die;
                } else {
                    $processCheckInMessage .= "Checkin successful!";
                }
            }
        } else {
            if (!updateContactCheckinStatus($date, getMemberInfoByRFID($rfid, "c.cid")["cid"], 0)) {
                // update user table, set active to 0 and insert last checkout time
                $errors = 1;
                $processCheckInMessage .= 'Could not update member status when checking out!';
                die;
            } else {
                if (!updateLog(getMemberInfoByRFID($rfid, "c.cid")["cid"], $date, getMemberInfoByRFID($rfid, "c.last_checkin_time")["last_checkin_time"])) {
                    // close log, insert checkout time (current date time)
                    $errors = 1;
                    $processCheckInMessage .= 'Could not close the log for user check out!';
                    die;
                } else {
                    $processCheckInMessage .= "Checkout successful!";
                }
            }
        }
    } else {
        $errors = 1;
        $processCheckInMessage .= "RFID key not found in the database!";
    }
    if ($errors == 1) {
        $processCheckInMessage = 'ERROR: ' . $processCheckInMessage;
        // in case there are errors, add 'ERROR: ' at the beginning of a status message.
        $response['hasErrors'] = $errors;
        $response['message'] = $processCheckInMessage;
    } else {
        $response['hasErrors'] = $errors;
        $response['message'] = $processCheckInMessage;
        $response['firstName'] = getMemberInfoByRFID($rfid, 'c.firstName')["firstName"];
        $response['lastName'] = getMemberInfoByRFID($rfid, 'c.lastName')["lastName"];
        $response['lastCheckInTime'] = getMemberInfoByRFID($rfid, 'c.last_checkin_time')["last_checkin_time"];
        $response['lastCheckOutTime'] = getMemberInfoByRFID($rfid, 'c.last_checkout_time')["last_checkout_time"];
    }
    return $response;
}
开发者ID:altinukshini,项目名称:HACCSY,代码行数:60,代码来源:functions.php


示例16: isset

     isset($_POST['id']) && $_POST['id'] != '' ? $id = trim($_POST['id']) : ($id = '');
     //SQL
     $sql = "UPDATE `respmagasin` SET `NUM_MLLE`='" . addslashes($personnel) . "' ,`CODE_MAGASIN`='" . addslashes($magasin) . "' ,`RES_DATEDEBUT`='" . addslashes($datedebut) . "' ,\r\n\t\t`RES_DATEFIN`='" . addslashes($datefin) . "'  WHERE ID_RESPO={$id}";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'un responsable (' . $personnel . ', ' . $magasin . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:responsable.php?selectedTab=par&rs=2');
     break;
 case 'check':
     $msg = "";
     isset($_POST['id']) && $_POST['id'] != '' ? $id = trim($_POST['id']) : ($codemagasin = '');
     if ($codemagasin != '') {
         $sql = "SELECT COUNT(CODE_MAGASIN) AS NBRE FROM  `service` WHERE `CODE_MAGASIN` LIKE '" . addslashes($id) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
             header('location:errorPage.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbresponsable.php


示例17: addslashes

         //SQL
         $sql .= "UPDATE `produit` SET  `PRD_PRIXACHAT`={$prixachat},`PRD_PRIXREVIENT`={$prixrevient}, `PRD_PRIXVENTE`={$prixvente},\r\n\t\t\t`PRD_PRIXACHATN2`={$prixachatn2},`PRD_PRIXREVIENTN2`={$prixrevientn2}, `PRD_PRIXVENTEN2`={$prixventen2}\r\n\t\t\tWHERE CODE_PRODUIT LIKE '" . addslashes($val) . "';";
     }
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Mise à jour des prix ');
     //updateLog($username, $idcust, $action='' )
     header('location:produit.php?selectedTab=par&rs=2');
     break;
 case 'check':
     $msg = "";
     isset($_POST['codeproduit']) && $_POST['codeproduit'] != '' ? $codeproduit = trim($_POST['codeproduit']) : ($codeproduit = '');
     if ($codeproduit != '') {
         $sql = "SELECT COUNT(CODE_PRODUIT) AS NBRE FROM  `produit` WHERE `CODE_PRODUIT` LIKE '" . addslashes($codeproduit) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
             header('location:errorPage.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbproduit.php


示例18: isset

        isset($_POST['dependance']) && $_POST['dependance'] != '' ? $dependance = trim($_POST['dependance']) : ($dependance = '');
        //SQL
        $sql = "UPDATE `localite` SET `ID_GRPLOC`='" . addslashes($grplocalite) . "' ,`LOC_NOM`='" . addslashes($localite) . "' ,`LOC_LIEN`='" . addslashes($dependance) . "' WHERE ID_LOCALITE ='" . addslashes($id) . "'";
        try {
            $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
            //Connexion to database
        } catch (PDOException $error) {
            //Treat error
            //("Erreur de connexion : " . $error->getMessage() );
            header('location:errorPage.php');
        }
        $query = $cnx->prepare($sql);
        //Prepare the SQL
        $query->execute();
        //Execute prepared SQL => $query
        updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Ajout d\'une localité (, ' . $localite . ')');
        //updateLog($username, $idcust, $action='' )
        header('location:localite.php?selectedTab=par&rs=2');
        break;
    default:
        ///Nothing
        //header('location:../index.php');
}
isset($_POST['myaction']) && $_POST['myaction'] != '' ? $myaction = $_POST['myaction'] : ($myaction = '');
switch ($myaction) {
    case 'edit':
        isset($_POST['rowSelection']) ? $id = $_POST['rowSelection'][0] : ($id = '');
        $split = preg_split('/ /', $id);
        try {
            $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
            //Connexion to database
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dblocalite.php


示例19: isset

     isset($_POST['unite']) && $_POST['unite'] != '' ? $unite = trim($_POST['unite']) : ($unite = '');
     //SQL
     $sql = "UPDATE `unite` SET `ID_UNITE`='" . addslashes($codeunite) . "' ,`UT_LIBELLE`='" . addslashes($unite) . "' WHERE ID_UNITE='" . addslashes($oldcodeunite) . "'";
     try {
         $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         //Connexion to database
     } catch (PDOException $error) {
         //Treat error
         //("Erreur de connexion : " . $error->getMessage() );
         header('location:errorPage.php');
     }
     $query = $cnx->prepare($sql);
     //Prepare the SQL
     $query->execute();
     //Execute prepared SQL => $query
     updateLog($_SESSION['GL_USER']['MAGASIN'], $_SESSION['GL_USER']['LOGIN'], $_SESSION['GL_USER']['MLLE'], 'Modification d\'une unite (' . $oldcodeunite . ', ' . $codeunite . ', ' . $article . ')');
     //updateLog($username, $idcust, $action='' )
     header('location:unite.php?selectedTab=par&rs=2');
     break;
 case 'check':
     $msg = "";
     isset($_POST['codeunite']) && $_POST['codeunite'] != '' ? $codeunite = trim($_POST['codeunite']) : ($codeunite = '');
     if ($codeunite != '') {
         $sql = "SELECT COUNT(ID_UNITE) AS NBRE FROM  `unite` WHERE `ID_UNITE` LIKE '" . addslashes($codeunite) . "'";
         try {
             $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
             //Connexion to database
         } catch (PDOException $error) {
             //Treat error
             //("Erreur de connexion : " . $error->getMessage() );
             header('location:errorPage.php');
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:dbunite.php


示例20: updateLog

该文章已有0人参与评论

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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