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

PHP MYSQL类代码示例

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

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



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

示例1: SiteCreator_css

function SiteCreator_css(&$smarty, $form = false)
{
    $mysql = new MYSQL($smarty);
    $tabela = $smarty->cfg['prefix'] . 'bilder_site';
    $mysql->SqlSelect("SELECT ID_SITE FROM {$tabela} WHERE site_dominio = '{$form['site_dominio']}'", __FILE__, __LINE__);
    if (mysql_affected_rows() > 0) {
        return $smarty->getFinishError('sitecreator_erro_01', array("", " - " . htmlspecialchars($this->form['site_dominio'])));
    }
    switch ($form['action']) {
        case "selectcss":
            $smarty->assign('ID_CSSCLASS', $form['ID_CSSCLASS']);
            return $smarty->fetch($smarty->modulo_dir . "select_css.tpl");
            break;
        default:
            $form['ID_MEMBER'] = $smarty->perfil['ID_MEMBER'];
            $sql = $mysql->SqlInsert($tabela, $form);
            $mysql->SqlSelect($sql, __FILE__, __LINE__);
            $idde = mysql_insert_id();
            $cam = './sites/' . $idde;
            //$cam = './sites/21';
            $site = new SiteCreator();
            $site->CopyDefultSite($cam);
            $site->createCfgfile($cam, array('ID_SITE' => $idde));
            $site->CopyCss($form['ID_CSS'], $cam);
            $site->createTemplates($cam, $form['site_pages']);
            unset($_POST);
            unset($_GET);
            return $smarty->getFinish('sitecreator_sucesso_01');
            break;
    }
}
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:31,代码来源:fnc.SiteCreator.php


示例2: FORMAT

 public static function FORMAT($S, $R, $P)
 {
     $I = array();
     if ($P === false) {
         $I[] = STR_REPLACE("/", "-", $R) . " 00:00:00";
         $I[] = STR_REPLACE("/", "-", $R) . " 24:59:59";
         $SET = 'HOUR';
     } else {
         $R = explode(" - ", $R);
         $I[] = STR_REPLACE("/", "-", $R[0]);
         $I[] = STR_REPLACE("/", "-", $R[1]);
         $SET = 'DAY';
     }
     $I[] = $S['s_id'];
     $Q = "SELECT MIN(t_checkout_created) AS `time`, AVG(t_checkout_price) AS `cost` FROM core_tickets_processed WHERE t_checkout_created >= ? AND t_checkout_created <= ? AND t_store = ? GROUP BY";
     $CA = MYSQL::QUERY($Q . " {$SET}(t_checkout_created) ORDER BY t_checkout_created ASC", $I);
     $CO = MYSQL::QUERY($Q . " t_checkout_created ORDER BY t_checkout_created ASC", $I);
     $STRING = array();
     $STRING[] = array('name' => 'Average Charge', 'data' => '');
     $STRING[] = array('name' => 'Checkout Charges', 'data' => '');
     foreach ($CA as $C) {
         $T = Date_UTC($C['time']);
         $STRING[0]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $T[3] . "," . $C['cost'];
     }
     foreach ($CO as $C) {
         $T = Date_UTC($C['time']);
         $STRING[1]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $T[3] . "," . $T[4] . "," . $C['cost'];
     }
     echo JSON_ENCODE($STRING);
 }
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:30,代码来源:1.php


示例3: FORMAT

 public static function FORMAT($S, $R, $P)
 {
     $I = array($S['s_id']);
     if ($P === false) {
         $TI = "AND d_date = ? LIMIT 1";
         $I[] = str_replace("/", "-", $R);
     } else {
         $R = explode(" - ", $R);
         $TI = "AND d_date >= ? AND d_date <= ? ORDER BY d_date ASC";
         $I[] = str_replace("/", "-", $R[0]);
         $I[] = str_replace("/", "-", $R[1]);
     }
     $CT = MYSQL::QUERY("SELECT * FROM core_stores_daily_checkouts WHERE s_id = ? {$TI}", $I);
     $STRING = array(array('name' => 'Sales', 'data' => ''));
     if (!$P === false) {
         foreach ($CT as $CL) {
             $T = Date_UTC($CL['d_date']);
             $Total = $CL['d_gross_nontaxable'] + $CL['d_gross_taxable'];
             $STRING[0]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $Total;
         }
     } else {
         $T = Date_UTC($CT['d_date']);
         $Total = $CT['d_gross_nontaxable'] + $CT['d_gross_taxable'];
         $STRING[0]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $Total;
     }
     if ($P === false) {
         $STRING[0]['type'] = 'column';
     }
     echo JSON_ENCODE($STRING);
 }
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:30,代码来源:2.php


示例4: myRoles

function myRoles($username, $defult = array(ANONYMOUS_ID_ROLE => 'anonymous user'))
{
    global $cfg;
    if ($username >= 0) {
        $mysql = new MYSQL($cfg);
        $key = key($defult);
        $valor = array_values($defult);
        $sql = "\n\t\t\tSELECT r.ID_ROLE, r.name, p.permission, (SELECT permission FROM {permission} WHERE ID_ROLE = '{$key}')as `{$valor[0]}`\n\t\t\tFROM {users_roles} ur\n\t\t\tNATURAL JOIN {role} r\n\t\t\tLEFT JOIN {permission} p ON p.ID_ROLE = ur.ID_ROLE\n\t\t\tWHERE ID_USER = '{$username}' ORDER BY r.weight DESC\n\t\t\t";
        $result = $mysql->SqlSelect($sql);
        $perm['permission'] = array();
        while ($row = mysql_fetch_assoc($result)) {
            $perm['permission'] = explode(",", $row['permission']) + explode(",", $row[$valor[0]]);
            $perm[$row['ID_ROLE']] = $row['name'];
        }
        return $perm;
    }
}
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:17,代码来源:fnc.Permission.php


示例5: stimulate

 public function stimulate(&$hash)
 {
     $db = new MYSQL();
     $db->connect(self::DB_HOST, self::DB_USER, self::DB_PASS, self::DB_DBNAME);
     @mysql_query("SET NAMES 'UTF8'");
     //must have a string parameter 'action'
     LINB::checkArgs($hash, array('string' => array('action' => NULL)));
     //handle the process
     switch ($hash->action) {
         case 'getlist':
             return $db->query("select `key`,`value` from `tbl_test`");
         case 'update':
             //must have string parameters 'key' and 'value'
             LINB::checkArgs($hash, array('string' => array('key' => NULL, 'value' => NULL)));
             $db->update("tbl_test", array("key" => $hash->key, "value" => $hash->value), "`key`='" . $hash->key . "'");
             return 'ok';
         case 'delete':
             //must have a string parameter 'key'
             LINB::checkArgs($hash, array('string' => array('key' => NULL)));
             $db->delete("tbl_test", "`key`='" . $hash->key . "'");
             return 'ok';
         case 'create':
             //must have string parameters 'key' and 'value'
             LINB::checkArgs($hash, array('string' => array('key' => NULL, 'value' => NULL)));
             $db->insert("tbl_test", array("key" => $hash->key, "value" => $hash->value));
             return 'ok';
     }
 }
开发者ID:esironal,项目名称:crossui,代码行数:28,代码来源:DBProcess.php


示例6: LoadRules

function LoadRules($id, $acesso = 'ALL', &$smarty)
{
    global $cfg;
    switch ($acesso) {
        case 'ONLY_GUEST':
            return $id != 0 ? false : true;
            break;
        case 'NOT_GUEST':
            return $id <= 0 ? false : true;
            break;
        case 'ALL':
            return true;
            break;
        default:
            $mysql = new MYSQL($smarty);
            $result = $mysql->SqlSelect("SELECT r.name\n\t\t\t\t\t\t\t\t\t\t\tFROM {$cfg[db_prefix]}role r\n\t\t\t\t\t\t\t\t\t\t\tRIGHT JOIN  {$cfg[db_prefix]}members_roles m ON r.ID_RULE = m.ID_RULE\n\t\t\t\t\t\t\t\t\t\t\tWHERE m.ID_MEMBER = '{$id}'\n\t\t\t\t\t\t\t\t\t\t\tORDER BY r.weight", __FILE__, __LINE__);
            if (mysql_affected_rows() > 0) {
                return $linha = mysql_fetch_assoc($result);
            } else {
                return false;
            }
            break;
    }
}
开发者ID:renatoinnocenti,项目名称:ModulosZend,代码行数:24,代码来源:fnc.Globals.php


示例7: FORMAT

 public static function FORMAT($S, $R, $P)
 {
     $I = array($S['s_id']);
     if ($P === false) {
         $TI = "AND d_date = ? LIMIT 1";
         $I[] = str_replace("/", "-", $R);
     } else {
         $R = explode(" - ", $R);
         $TI = "AND d_date >= ? AND d_date <= ? ORDER BY d_date ASC";
         $I[] = str_replace("/", "-", $R[0]);
         $I[] = str_replace("/", "-", $R[1]);
     }
     $CT = MYSQL::QUERY("SELECT * FROM core_stores_daily_checkouts WHERE s_id = ? {$TI}", $I);
     $STRING = array(array('name' => 'Cash', 'data' => ''), array('name' => 'Check', 'data' => ''), array('name' => 'American Express', 'data' => ''), array('name' => 'Discover', 'data' => ''), array('name' => 'Master Card', 'data' => ''), array('name' => 'Visa', 'data' => ''), array('name' => 'Debit', 'data' => ''));
     if (!$P === false) {
         foreach ($CT as $CL) {
             $T = Date_UTC($CL['d_date']);
             $STRING[0]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_cash'];
             $STRING[1]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_check'];
             $STRING[2]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_amex'];
             $STRING[3]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_discover'];
             $STRING[4]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_master'];
             $STRING[5]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_visa'];
             $STRING[6]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CL['d_debit'];
         }
     } else {
         $T = Date_UTC($CT['d_date']);
         $STRING[0]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_cash'];
         $STRING[1]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_check'];
         $STRING[2]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_amex'];
         $STRING[3]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_discover'];
         $STRING[4]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_master'];
         $STRING[5]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_visa'];
         $STRING[6]['data'][] .= $T[0] . "," . $T[1] . "," . $T[2] . "," . $CT['d_debit'];
     }
     if ($P === false) {
         $STRING[0]['type'] = 'column';
         $STRING[1]['type'] = 'column';
         $STRING[2]['type'] = 'column';
         $STRING[3]['type'] = 'column';
         $STRING[4]['type'] = 'column';
         $STRING[5]['type'] = 'column';
         $STRING[6]['type'] = 'column';
     }
     echo JSON_ENCODE($STRING);
 }
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:46,代码来源:4.php


示例8: stimulate

 public function stimulate(&$hash)
 {
     $db = new MYSQL();
     $db->connect(self::DB_HOST, self::DB_USER, self::DB_PASS);
     @mysql_query("SET NAMES 'UTF8'");
     //must have a string parameter 'action'
     LINB::checkArgs($hash, array('string' => array('action' => NULL)));
     //handle the process
     switch ($hash->action) {
         case 'listdbs':
             return $db->listdbs();
         case 'listtables':
             LINB::checkArgs($hash, array('string' => array('dbname' => NULL)));
             return $db->listtables($hash->dbname);
         case 'list':
             LINB::checkArgs($hash, array('string' => array('dbname' => NULL, 'tablename' => NULL, 'page' => 1, 'count' => 20)));
             $db->selectdb($hash->dbname);
             $count = $db->query("select count(*) from " . $hash->tablename);
             $table = $db->query("select * from " . $hash->tablename . " where 1 limit " . ($hash->page - 1) * 20 . ", " . $hash->count, true);
             return array($count, $table);
     }
 }
开发者ID:notchent,项目名称:linb,代码行数:22,代码来源:DBProcess.php


示例9: array

<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$CID = $_GET['cid'];
$CARD = $_GET['card'];
$TID = $_GET['tid'];
$CUSTOMER = MYSQL::QUERY('SELECT * FROM core_customers WHERE c_id = ? LIMIT 1', array($CID));
if (empty($CUSTOMER['c_card']) || $CUSTOMER['c_card'] == $CARD) {
    if (empty($CUSTOMER['c_card'])) {
        $CS = MYSQL::QUERY('SELECT c_id FROM core_customers WHERE c_card = ? LIMIT 1', array($CARD));
        if (empty($CS)) {
            echo "This customer has no card and this card is not in use. Please Enter their Primary email.<br/><br/><input type='email' placeholder='Customers Email Address..' style='width:280px;'><br/>\n\t\t\t<button style='cursor:pointer;width:287px;' onClick='AttachCard(\$(this)," . '"' . $CID . '"' . "," . '"' . $CARD . '"' . "," . '"' . $TID . '"' . "," . '"' . $user['store_info']['s_taxrate'] . '"' . ")'>Attach Card</button>";
        } else {
            echo "This card belongs to someone else...";
        }
    } else {
        echo "Valid Card. 5% Off Applied.\n        <script>AddDiscount('5','Membership Card','.ticket" . $TID . "','" . $user['store_info']['s_taxrate'] . "','" . $TID . "');</script>";
    }
} else {
    echo "This Customer has a different Card..";
}
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:23,代码来源:card.php


示例10: switch

require "../../../frame/engine.php";
ENGINE::START();
$USER = USER::VERIFY(0, TRUE);
if (empty($_GET['sSearch'])) {
    $S = $_GET['string'];
} else {
    $S = $_GET['sSearch'];
}
$iDS = $_GET['iDisplayStart'];
$iDL = $_GET['iDisplayLength'];
$iSC = $_GET['iSortCol_0'];
$iSD = $_GET['sSortDir_0'];
switch ($iSC) {
    case 0:
        $SS = 'ORDER BY c_name ' . $iSD;
        break;
    case 1:
        $SS = 'ORDER BY c_phone ' . $iSD;
        break;
    case 2:
        $SS = '';
        break;
}
$iTotal = MYSQL::QUERY('SELECT COUNT(c_id) AS `COUNT` FROM core_customers WHERE c_name LIKE ? OR c_phone LIKE ?', array('%' . $S . '%', '%' . $S . '%'));
$iQuery = MYSQL::QUERY("SELECT * FROM core_customers WHERE c_name LIKE ? OR c_phone LIKE ? {$SS} LIMIT {$iDS},{$iDL}", array('%' . $S . '%', '%' . $S . '%'), FALSE, TRUE);
$OUTPUT = array('sEcho' => $_GET['sEcho'], 'iTotalRecords' => $iTotal[0]['COUNT'], 'iTotalDisplayRecords' => $iTotal[0]['COUNT'], 'aaData');
foreach ($iQuery as $C) {
    $OUTPUT['aaData'][] = array($C['c_name'], FORMAT::PHONE($C['c_phone']), '<button onClick="LoadCustomer(' . "'" . $C['c_id'] . "'" . ')">LOAD</button>');
}
echo JSON_ENCODE($OUTPUT);
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:30,代码来源:cid.php


示例11: array

<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(1);
$date = $_GET['date'];
$store = $_GET['store'];
$NOTES = MYSQL::QUERY("SELECT ctn.t_note FROM core_tickets_status cts JOIN core_tickets_note ctn ON cts.t_id = ctn.t_id AND ctn.t_note LIKE ? WHERE t_store = ?", array('%Walkedout Ticket%', $STORE, $SD, $ED));
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:8,代码来源:walkout-cloud.php


示例12: array

$CHECKOUT = MYSQL::QUERY("SELECT * FROM core_checkout_sessions WHERE qb_id = ? LIMIT 1", array($_GET['chid']));
$ITEMS = EXPLODE('|', $CHECKOUT['items']);
$LIST = '';
$IT = 1;
$oldnontaxable = 0;
$nontaxable = 0;
$oldtaxable = 0;
$taxable = 0;
$oldtotaltax = 0;
$totaltax = 0;
foreach ($ITEMS as $I) {
    if ($I != '') {
        $I = EXPLODE('/', $I);
        $LIST .= '|' . $I[0] . '/' . $_GET['item' . $IT];
        $EX = EXPLODE('-', $I[0]);
        if ($EX[0] == 'ti') {
            MYSQL::QUERY('UPDATE core_tickets_processed SET t_checkout_created=?,t_checkout_price=? WHERE t_id=? LIMIT 1', array($_GET['date'], $_GET['item' . $IT], $EX[1]));
            $nontaxable = $nontaxable + ($_GET['item' . $IT] - 0);
            $oldnontaxable = $oldnontaxable + $I[1];
        } else {
            $taxable = $taxable + ($_GET['item' . $IT] - 0);
            $totaltax = $totaltax + ($_GET['item' . $IT] - 0) / 100 * $user['store_info']['s_taxrate'];
            $oldtaxable = $oldtaxable + $I[1];
            $oldtotaltax = $I[1] / 100 * $user['store_info']['s_taxrate'];
        }
    }
    $IT++;
}
MYSQL::QUERY('UPDATE core_checkout_sessions SET items=?,pm_1=?,pm_1_cost=?,pm_2=?,pm_2_cost=?,d_date=? WHERE qb_id=? LIMIT 1', array($LIST, $_GET['pm_1'], $_GET['pm_1_charge'], $_GET['pm_2'], $_GET['pm_2_charge'], $_GET['date'], $_GET['chid']));
TRACKING::CHECKOUTS($oldnontaxable, $oldtaxable, $oldtotaltax, $user, $CHECKOUT['pm_1'], $CHECKOUT['pm_1_cost'], $CHECKOUT['pm_2'], $CHECKOUT['pm_2_cost'], '-', $_GET['date']);
TRACKING::CHECKOUTS($nontaxable, $taxable, $totaltax, $user, $_GET['pm_1'], $_GET['pm_1_charge'], $_GET['pm_2'], $_GET['pm_2_charge'], '+', $_GET['date']);
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:31,代码来源:update_checkout.php


示例13: mysql_escape_string

                        }
                    }
                }
                if ($i == 1) {
                    $comma = ' ';
                } else {
                    $comma = ', ';
                }
                $added .= "{$name}<br/><br/>";
                $query .= $comma . '("' . $man[1] . '", "' . $type . '", "' . mysql_escape_string($name) . '", "' . mysql_escape_string($img) . '", "' . mysql_escape_string($also) . '", "' . $date . '")';
                $i++;
            }
            if ($query == 'INSERT IGNORE INTO device_models (m_manufacturer_id, m_type, m_name, m_link, m_known, m_date) VALUES') {
                break;
            }
            MYSQL::QUERY($query);
            $a++;
        }
        if ($type == 4) {
            break;
        }
        $type++;
    }
}
?>
<form method='post'>
<select name='manu'><?php 
echo $options;
?>
</select><input type='submit' name='submit' value='submit'>
</form>
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:31,代码来源:index2.php


示例14: STR_REPLACE

}
$A['Q2'] = STR_REPLACE(array('+', '-', '=', ' '), '', $Q);
if ($A['Q1'] != '=') {
    $A['Q3'] = 'quantity = quantity ' . $A['Q1'] . ' ?';
} else {
    $A['Q3'] = 'quantity = ?';
}
$A['P1'] = SUBSTR($P, 0, 1);
if (IS_NUMERIC($A['P1'])) {
    $A['P1'] = '=';
}
$A['P2'] = STR_REPLACE(array('+', '-', '=', ' '), '', $P);
if ($A['P1'] != '=') {
    $A['P3'] = 'price = price ' . $A['P1'] . ' ?';
} else {
    $A['P3'] = 'price = ?';
}
$A['M1'] = SUBSTR($M, 0, 1);
if (IS_NUMERIC($A['M1'])) {
    $A['M1'] = '=';
}
$A['M2'] = STR_REPLACE(array('+', '-', '=', ' '), '', $M);
if ($A['M1'] != '=') {
    $A['M3'] = 'minimum = minimum ' . $A['M1'] . ' ?';
} else {
    $A['M3'] = 'minimum = ?';
}
$Q = 'INSERT INTO inventory_stock (store, item, quantity, minimum, price, modified) VALUES (?,?,?,?,?,?) ON DUPLICATE KEY UPDATE ' . $A['Q3'] . ', ' . $A['P3'] . ', ' . $A['M3'];
MYSQL::QUERY($Q, array($user['store'], $PID, $A['Q2'], $A['M2'], $A['P2'], DATE('Y-m-d H:i:s'), $A['Q2'], $A['P2'], $A['M2']));
$CHECK = MYSQL::QUERY('SELECT quantity,minimum,price FROM inventory_stock WHERE store = ? AND item = ? LIMIT 1', array($user['store'], $PID));
echo $CHECK['quantity'] . '|' . $CHECK['price'] . '|' . $CHECK['minimum'];
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:31,代码来源:rowupdate.php


示例15: array

$TICKET = MYSQL::QUERY("SELECT * FROM core_tickets_status WHERE t_id = ? LIMIT 1", array($TID));
switch ($TICKET['t_status']) {
    case 97:
        $TBL = 'core_tickets_estimate';
        $ST = 1;
        break;
    case 98:
        $TBL = 'core_tickets_repair';
        $ST = 2;
        break;
    case 99:
        $TBL = 'core_tickets_checkout';
        $ST = 3;
        break;
}
$ROWS = MYSQL::QUERY("SHOW COLUMNS FROM {$TBL}");
$QUERY = "INSERT INTO {$TBL} SELECT ";
$I = 0;
foreach ($ROWS as $R) {
    if ($I == 0) {
        $QUERY .= $R['Field'];
    } else {
        $QUERY .= "," . $R['Field'];
    }
    $I++;
}
$QUERY .= " FROM core_tickets_walkout WHERE t_id = ? LIMIT 1";
MYSQL::QUERY($QUERY, array($TID));
MYSQL::QUERY("DELETE FROM core_tickets_walkout WHERE t_id = ? LIMIT 1", array($TID));
MYSQL::QUERY("UPDATE core_tickets_status SET t_status = ? WHERE t_id = ? LIMIT 1", array($ST, $TID));
USER::NOTE($TID, "Ticket Re-Opened", 2);
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:31,代码来源:reopen.php


示例16: array

<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$load = $_GET['load'];
$Main = MYSQL::QUERY('SELECT m_name FROM device_manufacturers WHERE m_id = ? LIMIT 1', array($load));
$manu = $Main['m_name'];
$Main = MYSQL::QUERY('SELECT m_id, m_name FROM device_models WHERE m_manufacturer_id = ? ORDER BY m_name ASC', array($load));
$i = 0;
$options = "";
foreach ($Main as $b) {
    $model = str_replace($manu . ' ', '', $b['m_name']);
    $options .= "<option value='" . $b['m_id'] . "'>" . $model . "</option>";
    $i++;
}
echo '<option value="">' . $i . ' Model(s) Found...</option>' . $options;
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:17,代码来源:model_template.php


示例17: PasswordHash

<?php

require "../../frame/engine.php";
ENGINE::START("HASH");
$Hash = new PasswordHash(8, true);
$USER = $_POST['usr'];
$USER_CLEAN = STRTOLOWER($USER);
$PASS = $_POST['pas'];
if (empty($USER) && empty($PASS)) {
    die('e1437');
} else {
    $R = MYSQL::QUERY("SELECT * FROM core_users WHERE username_clean = ? LIMIT 1", array($USER_CLEAN));
    if (empty($R)) {
        die('e1435');
    } else {
        if (!$Hash->CheckPassword($PASS, $R['password'])) {
            die('e1436');
        } else {
            $S = MYSQL::QUERY('SELECT * FROM core_stores WHERE s_id = ? LIMIT 1', array($R['store']));
            DATE_DEFAULT_TIMEZONE_SET($S['s_timezone']);
            USER::LOG("Logged In", $R['user_id']);
            $SES_EXP = TIME() + 43200;
            $SES_GEN = FORMAT::SES(50);
            $params = array($SES_GEN, $R['user_id'], $SES_EXP, $SES_GEN, $SES_EXP);
            MYSQL::QUERY('INSERT INTO core_users_sessions (session_key,session_user,session_experation) VALUES (?,?,?) ON DUPLICATE KEY UPDATE session_key=?,session_experation=?', $params);
            setcookie("core_u", $params[1], $SES_EXP, '/');
            setcookie("core_k", $params[0], $SES_EXP, '/');
            echo 's1434';
        }
    }
}
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:31,代码来源:verify.php


示例18: MYSQL

<?php

$tabela = 'produtos';
$mysql = new MYSQL($cfg);
$idde = trim($_POST['id']);
if (trim($_POST['edit'])) {
    array_pop($_POST);
    $sql = $mysql->SqlUpdate($tabela, $_POST, "id = '{$idde}'");
    $request = $mysql->SqlSelect($sql);
    $request = $mysql->SqlSelect($sql, __FILE__, __LINE__);
    if (request) {
        print "<h4>Registro Atualizado com sucesso!!!</h4>";
    }
}
$result = $mysql->SqlSelect("SELECT * FROM {$tabela} WHERE id = '" . $idde . "'");
$item = mysql_fetch_array($result, MYSQL_ASSOC);
?>

<form action="index.php?p=produtos&a=edit" method="post">
<label for="nome">Nome:<br />
    <input name="nome" type="text" value="<?php 
echo $item['nome'];
?>
" />
</label><br />
<label for="descricao">Descrição:<br />
<textarea name="descricao"><?php 
echo $item['descricao'];
?>
</textarea>
</label><br />
开发者ID:renatoinnocenti,项目名称:Serviceit-php,代码行数:31,代码来源:produtos_edit.php


示例19: trim

<?php

require "../../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0, TRUE);
$Fname = FORMAT::TEXT($_GET['Fname']);
$Lname = FORMAT::TEXT($_GET['Lname']);
$Phone = trim($_GET['phone']);
$Sec = trim($_GET['secondarymethod']);
$SecInfo = trim($_GET['secinfo']);
$Zip = trim($_GET['zip']);
$Market = trim($_GET['market']);
$Market_Location = trim($_GET['market_location']);
$Corporate_Account = trim($_GET['corpacc']);
$params = array("{$Fname} {$Lname}", $Zip, $Corporate_Account, $Phone, $Sec, $SecInfo, Date("Y-m-d H:i:s"));
$Main = MYSQL::QUERY('INSERT INTO core_customers (c_name,c_zip,c_acc,c_phone,c_contact_method,c_contact_info,c_join_date) VALUES (?,?,?,?,?,?,?)', $params);
USER::LOG("Customer Added [{$Fname} {$Lname}][{$Phone}]");
TRACKING::ADVERT($Market_Location, $user);
TRACKING::CUSTOMERS($user);
echo '<option value="' . str_pad($Main, 10, "0", STR_PAD_LEFT) . '">' . $Fname . ' ' . $Lname . '</option>';
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:20,代码来源:add.php


示例20: GetModels

<?php

require "../../frame/engine.php";
ENGINE::START();
$user = USER::VERIFY(0);
$Main = MYSQL::QUERY('SELECT m_id,m_name FROM device_manufacturers ORDER BY m_name ASC');
$options = "";
foreach ($Main as $b) {
    $options .= '<option value="' . $b['m_id'] . '">' . $b['m_name'] . '</option>';
}
?>
<script>
function GetModels(strURL,elemente,tease)
{
    $("#" + elemente).attr('disabled', true).trigger("liszt:updated");
    $.ajax({
        url: strURL,
        cache: false
    }).done(function( html ) { 
        $("#" + elemente).attr("disabled", false).html(html).trigger("liszt:updated");
    });
}

function RemoveError(Element){
    var thisid = $(Element).attr("id");
	$("#" + thisid + "_chzn a").removeClass("error");
}

function AddDevice(){
    var valid = $("#refurbform").valid();
	var selectvalid = $("#refurbform").validate().element("select");
开发者ID:Nvenom,项目名称:Cellwiz,代码行数:31,代码来源:add.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP MY_Controller类代码示例发布时间:2022-05-23
下一篇:
PHP MYPDF类代码示例发布时间: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