当前位置: 首页>>代码示例>>PHP>>正文


PHP nr_query函数代码示例

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


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

示例1: bankstaCreateRow

 /**
  * Creates new banksta row in Database
  * 
  * @param string $newDate
  * @param string $newHash
  * @param string $newFilename
  * @param string $newAdmin
  * @param string $newContract
  * @param string $newSumm
  * @param string $newAddress
  * @param string $newRealname
  * @param string $newNotes
  * @param string $newPate
  * @param string $newPtime
  * @param int $payId
  * 
  * @return void
  */
 protected function bankstaCreateRow($newDate, $newHash, $newFilename, $newAdmin, $newContract, $newSumm, $newAddress, $newRealname, $newNotes, $newPdate, $newPtime, $payId)
 {
     $query = "INSERT INTO `ukv_banksta` (`id`, `date`, `hash`, `filename`, `admin`, `contract`, `summ`, `address`, `realname`, `notes`, `pdate`, `ptime`, `processed`, `payid`)\n                                VALUES (\n                                NULL ,\n                                '" . $newDate . "',\n                                '" . $newHash . "',\n                                '" . $newFilename . "',\n                                '" . $newAdmin . "',\n                                '" . $newContract . "',\n                                '" . $newSumm . "',\n                                '" . $newAddress . "',\n                                '" . $newRealname . "',\n                                '" . $newNotes . "',\n                                '" . $newPdate . "',\n                                '" . $newPtime . "',\n                                '0',\n                                '" . $payId . "'\n                                );\n                            ";
     nr_query($query);
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:23,代码来源:api.ukv.php

示例2: zb_LousyTariffDelete

/**
 * Remove lousy mark
 *
 * @param   $tariff tariff name
 * 
 */
function zb_LousyTariffDelete($tariff)
{
    $tariff = mysql_real_escape_string($tariff);
    $query = "DELETE from `lousytariffs` WHERE `tariff`='" . $tariff . "' ";
    nr_query($query);
    log_register("LOUSYTARIFF DELETE `" . $tariff . "`");
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:13,代码来源:api.lousytariffs.php

示例3: zbs_CreditLogPush

/**
 * logs succeful self credit fact into database
 * 
 * @param  string $login existing users login
 * 
 * @return void
 */
function zbs_CreditLogPush($login)
{
    $login = mysql_real_escape_string($login);
    $date = curdatetime();
    $query = "INSERT INTO `zbssclog` (`id` , `date` , `login` ) VALUES ( NULL , '" . $date . "', '" . $login . "');";
    nr_query($query);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:14,代码来源:index.php

示例4: create

 /**
  * Creates new DB entry for some login
  * 
  * @param string $login
  * @param string $seal
  * @param string $length
  * @param string $price
  * 
  * @return void
  */
 protected function create($login, $seal, $length, $price)
 {
     $login = mysql_real_escape_string($login);
     $seal = mysql_real_escape_string($seal);
     $length = mysql_real_escape_string($length);
     $price = mysql_real_escape_string($price);
     $query = "INSERT INTO `condet` (`id`,`login`,`seal`,`length`,`price`) VALUES (NULL,'" . $login . "','" . $seal . "','" . $length . "', '" . $price . "');";
     nr_query($query);
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:19,代码来源:api.condet.php

示例5: ms_TicketCreate

 function ms_TicketCreate($from, $to, $text, $replyto = 'NULL', $admin = '')
 {
     $from = mysql_real_escape_string($from);
     $to = mysql_real_escape_string($to);
     $admin = mysql_real_escape_string($admin);
     $text = mysql_real_escape_string(strip_tags($text));
     $date = curdatetime();
     $replyto = vf($replyto);
     $query = "\n        INSERT INTO `ticketing` (\n    `id` ,\n    `date` ,\n    `replyid` ,\n    `status` ,\n    `from` ,\n    `to` ,\n    `text`,\n    `admin`\n        )\n    VALUES (\n    NULL ,\n    '" . $date . "',\n    " . $replyto . ",\n    '0',\n    '" . $from . "',\n    '" . $to . "',\n    '" . $text . "',\n    '" . $admin . "'\n           );\n        ";
     nr_query($query);
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:11,代码来源:index.php

示例6: create

 public function create($public, $type, $title, $text)
 {
     $public = vf($public, 3);
     $type = vf($type);
     $title = mysql_real_escape_string($title);
     $text = mysql_real_escape_string($text);
     $query = "INSERT INTO `zbsannouncements` (`id`,`public`,`type`,`title`,`text`) VALUES\n                (NULL, '" . $public . "', '" . $type . "', '" . $title . "', '" . $text . "'); ";
     nr_query($query);
     $newId = simple_get_lastid('zbsannouncements');
     log_register("ANNOUNCEMENT CREATE [" . $newId . "]");
     return $newId;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:12,代码来源:index.php

示例7: deleteComment

 /**
  * Deletes comment from database
  * 
  * @param type $id existing comment database ID
  * 
  * @return void
  */
 protected function deleteComment($id)
 {
     $id = vf($id, 3);
     $query = "DELETE FROM `adcomments` WHERE `id`='" . $id . "';";
     nr_query($query);
     log_register("ADCOMM DELETE SCOPE `" . $this->scope . "` ITEM [" . $this->item . "]");
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:14,代码来源:api.adcomments.php

示例8: zb_SwitchReplace

/**
 * Performs switch replacement in database
 * 
 * @param int $fromId
 * @param int $toId
 * @param int $employeeid
 * 
 * @return void
 */
function zb_SwitchReplace($fromId, $toId, $employeeId)
{
    $fromId = vf($fromId, 3);
    $toId = vf($toId, 3);
    $employeeId = vf($employeeId, 3);
    $allEmployees = ts_GetAllEmployee();
    $fromData = zb_SwitchGetData($fromId);
    $toData = zb_SwitchGetData($toId);
    if (!empty($fromData)) {
        //copy geo coordinates to new switch
        simple_update_field('switches', 'geo', $fromData['geo'], "WHERE `id`='" . $toId . "'");
        //setting new description and remove NP flag
        $newDescriptionTo = str_replace('NP', 'm:' . @$allEmployees[$employeeId], $toData['desc']);
        simple_update_field('switches', 'desc', $newDescriptionTo, "WHERE `id`='" . $toId . "'");
        //copy location
        simple_update_field('switches', 'location', $fromData['location'], "WHERE `id`='" . $toId . "'");
        //copy switch parent ID
        if (!empty($fromData['parentid'])) {
            simple_update_field('switches', 'parentid', $fromData['parentid'], "WHERE `id`='" . $toId . "'");
        } else {
            $parentId_q = "UPDATE `switches` SET `parentid`=NULL WHERE `id`='" . $toId . "';";
            nr_query($parentId_q);
        }
        //moving childs if it present
        simple_update_field('switches', 'parentid', $toId, "WHERE `parentid`='" . $fromId . "'");
        // doing old switch cleanup and disabling it
        simple_update_field('switches', 'geo', '', "WHERE `id`='" . $fromId . "'");
        $newFromLocation = __('removed from') . ': ' . $fromData['location'];
        simple_update_field('switches', 'location', $newFromLocation, "WHERE `id`='" . $fromId . "'");
        $newFromDesc = 'NP u:' . @$allEmployees[$employeeId];
        simple_update_field('switches', 'desc', $newFromDesc, "WHERE `id`='" . $fromId . "'");
        $parentIdFrom_q = "UPDATE `switches` SET `parentid`=NULL WHERE `id`='" . $fromId . "';";
        nr_query($parentIdFrom_q);
        log_register("SWITCH REPLACE FROM [" . $fromId . "] TO [" . $toId . "] EMPLOYEE [" . $employeeId . "]");
    } else {
        show_error(__('Strange exeption') . ': FROM_SWITCH_EMPTY_DATA');
    }
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:47,代码来源:api.switches.php

示例9: savePassport

 /**
  * saves new passport data for some build
  * 
  * @return void
  */
 protected function savePassport()
 {
     if (wf_CheckPost(array('savebuildpassport'))) {
         $buildid = vf($_POST['savebuildpassport'], 3);
         // Yep, im know - thats shitty solution. Need to refactor this later.
         $clean_query = "DELETE FROM `buildpassport` WHERE `buildid`='" . $buildid . "';";
         nr_query($clean_query);
         $owner = mysql_real_escape_string($_POST['powner']);
         $ownername = mysql_real_escape_string($_POST['pownername']);
         $ownerphone = mysql_real_escape_string($_POST['pownerphone']);
         $ownercontact = mysql_real_escape_string($_POST['pownercontact']);
         $keys = isset($_POST['pkeys']) ? 1 : 0;
         $accessnotices = mysql_real_escape_string($_POST['paccessnotices']);
         $floors = mysql_real_escape_string($_POST['pfloors']);
         $entrances = mysql_real_escape_string($_POST['pentrances']);
         $apts = mysql_real_escape_string($_POST['papts']);
         $notes = mysql_real_escape_string($_POST['pnotes']);
         $query = "INSERT INTO `buildpassport` (\n                                `id` ,\n                                `buildid` ,\n                                `owner` ,\n                                `ownername` ,\n                                `ownerphone` ,\n                                `ownercontact` ,\n                                `keys` ,\n                                `accessnotices` ,\n                                `floors` ,\n                                `apts` ,\n                                `entrances` ,\n                                `notes`\n                                )\n                                VALUES (\n                                NULL ,\n                                '" . $buildid . "',\n                                '" . $owner . "',\n                                '" . $ownername . "',\n                                '" . $ownerphone . "',\n                                '" . $ownercontact . "',\n                                '" . $keys . "',\n                                '" . $accessnotices . "',\n                                '" . $floors . "',\n                                '" . $apts . "',\n                                '" . $entrances . "',\n                                '" . $notes . "'\n                                );\n                        ";
         nr_query($query);
         log_register('BUILD PASSPORT SAVE [' . $buildid . ']');
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:27,代码来源:api.address.php

示例10: log_register

/**
 * Just system logging subroutine
 * 
 * @param string $event
 */
function log_register($event)
{
    $admin_login = whoami();
    @($ip = $_SERVER['REMOTE_ADDR']);
    if (!$ip) {
        $ip = '127.0.0.1';
    }
    $current_time = curdatetime();
    $event = mysql_real_escape_string($event);
    $query = "INSERT INTO `weblogs` (`id`,`date`,`admin`,`ip`,`event`) VALUES(NULL,'" . $current_time . "','" . $admin_login . "','" . $ip . "','" . $event . "')";
    nr_query($query);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:17,代码来源:api.compat.php

示例11: ts_DeleteTask

/**
 * Deletes existing task from database
 * 
 * @param int $taskid
 * 
 * @return void
 */
function ts_DeleteTask($taskid)
{
    $taskid = vf($taskid, 3);
    $query = "DELETE from `taskman` WHERE `id`='" . $taskid . "'";
    nr_query($query);
    log_register("TASKMAN DELETE " . $taskid);
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:14,代码来源:api.teskman.php

示例12: ra_UserRebuildAttributes

function ra_UserRebuildAttributes($login, $attrtemplate, $verbose = false)
{
    $login = mysql_real_escape_string($login);
    $clean_q = "DELETE from `radattr` WHERE `login`='" . $login . "'";
    nr_query($clean_q);
    if (!empty($attrtemplate)) {
        if ($verbose) {
            show_window(__('User attributes'), '<pre>' . $attrtemplate . '</pre>');
        }
        $splitted = explodeRows($attrtemplate);
        if (!empty($splitted)) {
            foreach ($splitted as $io => $eachattr) {
                if (ispos($eachattr, '=')) {
                    $attr_raw = explode('=', $eachattr);
                    $attr = $attr_raw[0];
                    $value = $attr_raw[1];
                    $query = "INSERT INTO `radattr` (`id` ,`login` ,`attr` ,`value`) VALUES (NULL , '" . $login . "', '" . $attr . "', '" . $value . "');";
                    nr_query($query);
                }
            }
        }
    }
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:23,代码来源:api.radius.php

示例13: zb_UserDeleteSignupPrice

/**
 * Deletes user signup price record from database
 * 
 * @param string $login
 */
function zb_UserDeleteSignupPrice($login)
{
    $query = "DELETE FROM `signup_prices_users` WHERE `login` = '" . $login . "'";
    nr_query($query);
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:10,代码来源:api.payments.php

示例14: op_HandleStg

/**
 * Stargazer direct handler
 * 
 * @param int $virtualid
 * @param float $cash
 * @param string $paysys
 * 
 * @return void
 */
function op_HandleStg($virtualid, $cash, $paysys = '')
{
    $opconfig = op_LoadConfig();
    $allcustomers = op_CustomersGetAll();
    $sgconf = $opconfig['SGCONF'];
    $stg_host = $opconfig['STG_HOST'];
    $stg_port = $opconfig['STG_PORT'];
    $stg_login = $opconfig['STG_LOGIN'];
    $stg_passwd = $opconfig['STG_PASSWD'];
    if (isset($opconfig['UB_CASHTYPE'])) {
        $ub_cashtype = $opconfig['UB_CASHTYPE'];
    } else {
        //cash money by default
        $ub_cashtype = 1;
    }
    if ($paysys == '') {
        $note = 'OPENPAYZ';
    } else {
        $note = 'OP:' . $paysys;
    }
    if (isset($allcustomers[$virtualid])) {
        $login = $allcustomers[$virtualid];
        //adding cash if login exists
        $addcash_cmd = $sgconf . ' set -s ' . $stg_host . ' -p ' . $stg_port . ' -a' . $stg_login . ' -w' . $stg_passwd . ' -u' . $login . ' -c ' . $cash;
        shell_exec($addcash_cmd);
        //ubilling payment logging
        $curdate = date("Y-m-d H:i:s");
        $balance_q = "SELECT `Cash` from `users` WHERE `login`='" . $login . "'";
        $curbalance = simple_query($balance_q);
        $curbalance = $curbalance['Cash'] - $cash;
        $query_paymentlog = "INSERT INTO `payments` (`id` , `login` , `date` ,  `admin` , `balance` , `summ` , `cashtypeid` , `note` )\n                             VALUES (NULL , '" . $login . "', '" . $curdate . "', 'openpayz', '" . $curbalance . "', '" . $cash . "', '" . $ub_cashtype . "', '" . $note . "');";
        nr_query($query_paymentlog);
    }
}
开发者ID:carriercomm,项目名称:Ubilling,代码行数:43,代码来源:api.openpayz.php

示例15: im_ThreadMarkAsRead

/**
 * mark thread as read by sender
 * 
 * @param string $sender   sender login
 * 
 * @return void
 */
function im_ThreadMarkAsRead($sender)
{
    $sender = mysql_real_escape_string($sender);
    $me = whoami();
    $query = "UPDATE `ub_im` SET `read` = '1' WHERE `to` = '" . $me . "' AND `from`='" . $sender . "' AND `read`='0'";
    nr_query($query);
}
开发者ID:nightflyza,项目名称:Ubilling,代码行数:14,代码来源:api.ubim.php


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