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


PHP simple_update_field函数代码示例

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


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

示例1: update

 /**
  * Updates existing DB entry for some login
  * 
  * @param string $login
  * @param string $seal
  * @param string $length
  * @param string $price
  * 
  * @return void
  */
 protected function update($login, $seal, $length, $price)
 {
     $login = mysql_real_escape_string($login);
     simple_update_field('condet', 'seal', $seal, "WHERE `login`='" . $login . "';");
     simple_update_field('condet', 'length', $length, "WHERE `login`='" . $login . "';");
     simple_update_field('condet', 'price', $price, "WHERE `login`='" . $login . "';");
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:17,代码来源:api.condet.php

示例2: save

 public function save()
 {
     $value = serialize($_POST[self::FORM_NAME]);
     $value = base64_encode($value);
     simple_update_field('nas', 'options', $value, "WHERE `id` = '" . $this->_id . "'");
     // Re-new options current values:
     $this->options = zb_NasOptionsGet($this->_id);
     // Return
     return true;
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:10,代码来源:index.php

示例3: ts_PrintTasks

     } else {
         //printable result
         if (wf_CheckPost(array('printdatefrom', 'printdateto'))) {
             ts_PrintTasks($_POST['printdatefrom'], $_POST['printdateto']);
         }
         //show printing form
         show_window(__('Tasks printing'), ts_PrintDialogue());
     }
 } else {
     //sms post sending
     if (wf_CheckPost(array('postsendemployee', 'postsendsmstext'))) {
         $smsDataRaw = ts_SendSMS($_POST['postsendemployee'], $_POST['postsendsmstext']);
         if (!empty($smsDataRaw)) {
             $smsDataSave = serialize($smsDataRaw);
             $smsDataSave = "'" . base64_encode($smsDataSave) . "'";
             simple_update_field('taskman', 'smsdata', $smsDataSave, "WHERE `id`='" . $_GET['edittask'] . "'");
             //flushing dark void
             $darkVoid = new DarkVoid();
             $darkVoid->flushCache();
             rcms_redirect('?module=taskman&edittask=' . $_GET['edittask']);
         }
     }
     //sms data flush
     if (wf_CheckGet(array('flushsmsdata'))) {
         ts_FlushSMSData($_GET['flushsmsdata']);
         rcms_redirect('?module=taskman&edittask=' . $_GET['flushsmsdata']);
     }
     /**
      * Salary accounting actions
      */
     if ($altCfg['SALARY_ENABLED']) {
开发者ID:nightflyza,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例4: zb_TicketSetUnDone

/**
 * Marks ticket as unreviewed in database
 * 
 * @param int $ticketid
 * 
 * @return void
 */
function zb_TicketSetUnDone($ticketid)
{
    $ticketid = vf($ticketid, 3);
    simple_update_field('ticketing', 'status', '0', "WHERE `id`='" . $ticketid . "'");
    log_register("TICKET OPEN [" . $ticketid . "]");
}
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:13,代码来源:api.ticketing.php

示例5: setUnDone

 /**
  * Marks signup request as undone in database
  * 
  * @param int $reqid Existing request ID
  * 
  * @return void
  */
 public function setUnDone($reqid)
 {
     $requid = vf($reqid, 3);
     simple_update_field('sigreq', 'state', '0', "WHERE `id`='" . $reqid . "'");
     log_register('SIGREQ UNDONE [' . $reqid . ']');
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:13,代码来源:api.sigreq.php

示例6: zb_AddressDeleteBuild

     if (!zb_AddressBuildProtected($_GET['buildid'])) {
         zb_AddressDeleteBuild($_GET['buildid']);
         rcms_redirect("?module=builds&action=edit&streetid=" . $streetid);
     } else {
         show_window('', wf_Link("?module=builds&action=edit&streetid=" . $streetid, 'Back', false, 'ubButton'));
         show_error(__('You can not delete a building if there are users of the apartment'));
     }
 }
 if ($_GET['action'] == 'editbuild') {
     $buildid = vf($_GET['buildid']);
     $streetid = vf($_GET['streetid']);
     //build edit subroutine
     if (isset($_POST['editbuildnum'])) {
         if (!empty($_POST['editbuildnum'])) {
             simple_update_field('build', 'buildnum', $_POST['editbuildnum'], "WHERE `id`='" . $buildid . "'");
             simple_update_field('build', 'geo', $_POST['editbuildgeo'], "WHERE `id`='" . $buildid . "'");
         }
         log_register("CHANGE AddressBuild [" . $buildid . "] " . mysql_real_escape_string($_POST['editbuildnum']));
         rcms_redirect("?module=builds&action=edit&streetid=" . $streetid);
     }
     //construct edit form
     $builddata = zb_AddressGetBuildData($buildid);
     $streetname = zb_AddressGetStreetData($streetid);
     $streetname = $streetname['streetname'];
     $editinputs = $streetname . " " . $builddata['buildnum'] . wf_tag('hr');
     $editinputs .= wf_TextInput('editbuildnum', 'Building number', $builddata['buildnum'], true, '10');
     $editinputs .= wf_TextInput('editbuildgeo', 'Geo location', $builddata['geo'], true, '20');
     $editinputs .= wf_Submit('Save');
     $editform = wf_Form('', 'POST', $editinputs, 'glamour');
     show_window(__('Edit') . ' ' . __('Build'), $editform);
     show_window('', wf_Link("?module=builds&action=edit&streetid=" . $streetid, 'Back', true, 'ubButton'));
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例7: 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

示例8: timesheetSaveChanges

 /**
  * Saves timesheet editing results into database
  * 
  * @return void
  */
 public function timesheetSaveChanges()
 {
     if (wf_CheckPost(array('edittimesheetid'))) {
         $id = vf($_POST['edittimesheetid'], 3);
         if (isset($this->allTimesheets[$id])) {
             $timesheetData = $this->allTimesheets[$id];
             $timesheetDate = $timesheetData['date'];
             $employee = $timesheetData['employeeid'];
             $hours = vf($_POST['editemployeehours'], 3);
             $hospitalFlag = wf_CheckPost(array('edithospital')) ? 1 : 0;
             $holidayFlag = wf_CheckPost(array('editholiday')) ? 1 : 0;
             $where = " WHERE `id`='" . $id . "';";
             if ($timesheetData['hours'] != $hours) {
                 simple_update_field('salary_timesheets', 'hours', $hours, $where);
             }
             if ($timesheetData['holiday'] != $holidayFlag) {
                 simple_update_field('salary_timesheets', 'holiday', $holidayFlag, $where);
             }
             if ($timesheetData['hospital'] != $hospitalFlag) {
                 simple_update_field('salary_timesheets', 'hospital', $hospitalFlag, $where);
             }
             log_register('SALARY EDIT TIMESHEET [' . $id . '] `' . $timesheetDate . '` EMPLOYEE  [' . $employee . '] HOURS `' . $hours . '` HOSPITAL `' . $hospitalFlag . '` HOLIDAY `' . $holidayFlag . '`');
         } else {
             log_register('SALARY EDIT FAIL TIMESHEET [' . $id . '] NOT_EXISTING_ID');
         }
     }
 }
开发者ID:carriercomm,项目名称:Ubilling,代码行数:32,代码来源:api.salary.php

示例9: changeTask

 public function changeTask()
 {
     $taskID = vf($_GET['edit'], 3);
     if (wf_CheckPost(array('editname', 'editaction', 'editparam'))) {
         if (!empty($taskID)) {
             if (isset($_POST['editactive'])) {
                 $actFlag = 1;
             } else {
                 $actFlag = 0;
             }
             simple_update_field('watchdog', 'name', $_POST['editname'], "WHERE `id`='" . $taskID . "'");
             simple_update_field('watchdog', 'checktype', $_POST['editchecktype'], "WHERE `id`='" . $taskID . "'");
             simple_update_field('watchdog', 'param', $_POST['editparam'], "WHERE `id`='" . $taskID . "'");
             simple_update_field('watchdog', 'operator', $_POST['editoperator'], "WHERE `id`='" . $taskID . "'");
             simple_update_field('watchdog', 'condition', $_POST['editcondition'], "WHERE `id`='" . $taskID . "'");
             simple_update_field('watchdog', 'action', $_POST['editaction'], "WHERE `id`='" . $taskID . "'");
             simple_update_field('watchdog', 'active', $actFlag, "WHERE `id`='" . $taskID . "'");
             log_register("WATCHDOG CHANGE TASK [" . $taskID . "] `" . $_POST['editname'] . "`");
         } else {
             throw new Exception(self::TASKID_EX);
         }
     } else {
         throw new Exception(self::TASKADD_EX);
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:25,代码来源:api.watchdog.php

示例10: docsis_ModemAdd

 if (wf_CheckPost(array('newmaclan'))) {
     docsis_ModemAdd($_POST['newmaclan']);
 }
 //deleting modem
 if (wf_CheckGet(array('deletemodem'))) {
     docsis_ModemDelete($_GET['deletemodem']);
     rcms_redirect("?module=docsis");
 }
 //editing modem
 if (isset($_POST['edituserbind']) and isset($_POST['editnote'])) {
     $editmodemid = vf($_GET['showmodem'], 3);
     if (!empty($editmodemid)) {
         $newmodemuserbind = mysql_real_escape_string($_POST['edituserbind']);
         $newmodemnote = mysql_real_escape_string($_POST['editnote']);
         simple_update_field('modems', 'userbind', $newmodemuserbind, "WHERE `id`='" . $editmodemid . "'");
         simple_update_field('modems', 'note', $newmodemnote, "WHERE `id`='" . $editmodemid . "'");
         log_register("DOCSIS MODEM EDIT BIND `" . $newmodemuserbind . "` [" . $editmodemid . "]");
         rcms_redirect("?module=docsis&showmodem=" . $editmodemid);
     } else {
         show_window(__('Error'), __('Strange exeption'));
     }
 }
 //setting modem snmp community
 if (wf_CheckPost(array('newmodemcommunity', 'newsnmpwalkpath'))) {
     docsis_ModemSnmpSet($_POST['newmodemcommunity']);
     docsis_ModemSnmpWalkSet($_POST['newsnmpwalkpath']);
     rcms_redirect("?module=docsis");
 }
 //show controls
 docsis_ControlsShow();
 //show modems list by default
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例11: poolLinkLogin

 /**
  * changes pool login
  * 
  * @param int $poolid Existing poolID
  * @param string $login Existin ubilling user login
  * 
  * @return void
  */
 public function poolLinkLogin($poolid, $login)
 {
     $poolid = vf($poolid, 3);
     $login = trim($login);
     if (isset($this->pools[$poolid])) {
         simple_update_field('netextpools', 'login', $login, "WHERE `id`='" . $poolid . "'");
         log_register("POOL LINK USER `" . $login . "`");
     } else {
         throw new Exception(self::EX_NOEXPOOL);
     }
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:19,代码来源:api.extnets.php

示例12: vf

<?php

if (cfr('SWITCHMAP')) {
    $altercfg = $ubillingConfig->getAlter();
    if ($altercfg['SWYMAP_ENABLED']) {
        //wysiwyg switch placement
        if (wf_CheckPost(array('switchplacing', 'placecoords'))) {
            if (cfr('SWITCHESEDIT')) {
                $switchid = vf($_POST['switchplacing'], 3);
                $placegeo = mysql_real_escape_string($_POST['placecoords']);
                simple_update_field('switches', 'geo', $placegeo, "WHERE `id`='" . $switchid . "'");
                log_register('SWITCH CHANGE [' . $switchid . ']' . ' GEO ' . $placegeo);
                rcms_redirect("?module=switchmap&locfinder=true");
            } else {
                show_error(__('Access denied'));
            }
        }
        $ymconf = $ubillingConfig->getYmaps();
        $ym_center = $ymconf['CENTER'];
        $ym_zoom = $ymconf['ZOOM'];
        $ym_type = $ymconf['TYPE'];
        $ym_lang = $ymconf['LANG'];
        $area = '';
        //show map container
        sm_ShowMapContainer();
        //collect switches geolocation data
        if (!wf_CheckGet(array('coverage'))) {
            $placemarks = sm_MapDrawSwitches();
            //uplinks display mode
            if (wf_CheckGet(array('showuplinks')) and !wf_CheckGet(array('traceid'))) {
                $placemarks .= sm_MapDrawSwitchUplinks();
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php

示例13: ms_TicketSetDone

 function ms_TicketSetDone($ticketid)
 {
     $ticketid = vf($ticketid);
     simple_update_field('ticketing', 'status', '1', "WHERE `id`='" . $ticketid . "'");
 }
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:5,代码来源:index.php

示例14: onuAssign

 /**
  * Assigns exinsting ONU with some login
  * 
  * @param int $onuid
  * @param string $login
  * 
  * @return void
  */
 public function onuAssign($onuid, $login)
 {
     $onuid = vf($onuid, 3);
     if (isset($this->allOnu[$onuid])) {
         simple_update_field('pononu', 'login', $login, "WHERE `id`='" . $onuid . "'");
         log_register('PON ASSIGN ONU [' . $onuid . '] WITH (' . $login . ')');
     } else {
         log_register('PON ASSIGN ONU [' . $onuid . '] FAILED');
     }
 }
开发者ID:nightflyza,项目名称:Ubilling,代码行数:18,代码来源:api.pon.php

示例15: show_window

     } else {
         show_window(__('Error'), __('Required fields'));
     }
 }
 //if someone deleting tagtype
 if (isset($_GET['delete'])) {
     stg_delete_tagtype($_GET['delete']);
     rcms_redirect("?module=usertags");
 }
 //if someone wants to edit tagtype
 if (isset($_GET['edit'])) {
     $tagtypeid = vf($_GET['edit'], 3);
     if (isset($_POST['edittagcolor'])) {
         simple_update_field('tagtypes', 'tagcolor', $_POST['edittagcolor'], "WHERE `id`='" . $tagtypeid . "'");
         simple_update_field('tagtypes', 'tagsize', $_POST['edittagsize'], "WHERE `id`='" . $tagtypeid . "'");
         simple_update_field('tagtypes', 'tagname', $_POST['edittagname'], "WHERE `id`='" . $tagtypeid . "'");
         log_register("TAGTYPE CHANGE [" . $tagtypeid . ']');
         rcms_redirect("?module=usertags");
     }
     //form construct
     $tagpriorities = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6');
     $tagtypedata = stg_get_tagtype_data($tagtypeid);
     $editinputs = wf_ColPicker('edittagcolor', __('Color'), $tagtypedata['tagcolor'], true, '20');
     $editinputs .= wf_TextInput('edittagname', 'Text', $tagtypedata['tagname'], true, 20);
     $editinputs .= wf_Selector('edittagsize', $tagpriorities, 'Priority', $tagtypedata['tagsize'], true);
     $editinputs .= wf_Submit('Save');
     $editform = wf_Form('', 'POST', $editinputs, 'glamour');
     show_window(__('Edit'), $editform);
     show_window('', wf_Link("?module=usertags", 'Back', true, 'ubButton'));
 }
 //show available tagtypes
开发者ID:l1ght13aby,项目名称:Ubilling,代码行数:31,代码来源:index.php


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