當前位置: 首頁>>代碼示例>>PHP>>正文


PHP modify函數代碼示例

本文整理匯總了PHP中modify函數的典型用法代碼示例。如果您正苦於以下問題:PHP modify函數的具體用法?PHP modify怎麽用?PHP modify使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了modify函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ref

function ref($a)
{
    $b =& $a;
    var_dump(rvalue_sort(get_defined_vars()));
    modify(rvalue_sort(get_defined_vars()));
    var_dump($b);
}
開發者ID:n3b,項目名稱:hiphop-php,代碼行數:7,代碼來源:get_defined_vars.php

示例2: modify

 function modify()
 {
     global $lll, $siteDemo, $allowedMethods;
     $found = FALSE;
     if ($siteDemo || !class_exists('rss')) {
         // It is disabled to save these attributes in the demo version:
         foreach (array("extraHead", "extraBody", "extraTopContent", "extraBottomContent", "extraFooter", "logoImage", "headerBackground") as $attr) {
             if (!empty($this->{$attr})) {
                 $found = TRUE;
                 $this->{$attr} = "";
             }
         }
     }
     foreach (array("homeLocation", "redirectFirstLogin", "redirectLogin", "redirectAdminLogin") as $attr) {
         $ctrl = new AppController();
         if ($this->{$attr}) {
             if (!$ctrl->init($this->{$attr}) || !isset($allowedMethods[$ctrl->method]) || !class_exists($ctrl->getClass())) {
                 return Roll::setFormInvalid("invalidInternalLink", $this->{$attr});
             }
         }
     }
     modify($this);
     $this->uploadImages();
     if ($found) {
         Roll::setInfoText("This feature is not available in the Lite (and demo) version of the program!");
     }
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:27,代碼來源:settings.php

示例3: executeCronJobs

function executeCronJobs()
{
    global $now;
    G::load($cronjobs, "SELECT * FROM @cronjob WHERE active='1' AND NOW()-INTERVAL frequency HOUR > lastExecutionTime");
    foreach ($cronjobs as $cronjob) {
        eval($cronjob->function);
        $cronjob->lastExecutionTime = $now;
        modify($cronjob);
    }
}
開發者ID:alencarmo,項目名稱:OCF,代碼行數:10,代碼來源:cronjob.php

示例4: generateModel

function generateModel($city, $state, $climateZone, $additionalOptions)
{
    //additonalOptions is an associative array with specified options
    // ex. 'floor_height' => 5.675
    $defaultContents = "{\"timestep\": 1, \"run_number\": 1, \"climate_zone\": \"{$climateZone}\", \"state\": \"{$state}\", \"city\": \"{$city}\", \"number_of_floors\": 3, \"floor_height\": 3.9624, \"plenums\": true, \"orientation\": 0.0, \"building_type\": \"medium_office\", \"geometry_configuration\": \"Rectangle\", \"zone_layout\": \"Five_Zone\", \"roof_style\": \"flat\", \"wall_type\": \"Steel_Frame_Non_Res\", \"roof_type\": \"iead_non_res\", \"south_wwr\": 0.477, \"east_wwr\": 0.477, \"north_wwr\": 0.477, \"west_wwr\": 0.477, \"south_win_type\": \"reference\", \"east_win_type\": \"reference\", \"north_win_type\": \"reference\", \"west_win_type\": \"reference\", \"hvac_type\": \"vav\", \"heating_coil\": \"Gas\", \"has_reheat\": true, \"reheat_coil\": \"Electric\", \"heating_efficiency\": 0.8, \"cooling_cop\": 3.23372055845678, \"fan_efficiency\": 0.5915, \"fan_static_pressure\": 1109.648, \"elec_plug_intensity\": 10.76, \"int_lighting_intensity\": 10.76, \"ext_lighting_intensity\": 14804, \"people_density\": 18.58, \"infiltration_per_ext_sur_area\": 0.000302, \"oa_vent_per_person\": 0.0125, \"oa_vent_per_area\": 0.0, \"length1\": 49.911, \"length2\": 0.0, \"width1\": 33.2738, \"width2\": 0.0, \"end1\": 0.0, \"end2\": 0.0, \"offset1\": 0.0, \"offset2\": 0.0, \"offset3\": 0.0, \"has_setback\": true, \"has_night_cycle\": true, \"night_cycle\": \"CycleOnAny\", \"has_dcv\": false, \"cooling_setback\": 26.7, \"heating_setback\": 15.6, \"cooling_setpoint\": 24.0, \"heating_setpoint\": 21.0, \"has_weekend_occupancy\": true, \"weekend_occupancy_type\": \"Saturday\", \"weekday_start_time\": \"06:00\", \"weekday_end_time\": \"22:00\", \"weekend_start_time\": \"06:00\", \"weekend_end_time\": \"18:00\", \"use_mechanical_vent\": false}";
    $contents = modify($defaultContents, $additionalOptions);
    $contents = str_replace('"', "'", $contents);
    // replace double quotes with single quotes
    $generator = "python yourserverpath/autotune/backend/idfgenerator.py";
    //on the server
    //$generator = "C:/xampp/htdocs/Git/backend/idfgenerator.py"; //testing locally
    $command = "{$generator} \"{$contents}\"";
    //call python script
    $modelContents = array();
    exec($command, $modelContents);
    $strContents = implode("\n", $modelContents);
    //make array into a string
    return $strContents;
}
開發者ID:bjurban,項目名稱:Autotune,代碼行數:19,代碼來源:paramGen.php

示例5: main

function main()
{
    global $result;
    switch ($_REQUEST['query']) {
        case "add":
            add();
            break;
        case "modify":
            modify();
            break;
        case "delete":
            del();
            break;
        default:
            $result['status'] = 404;
            $result['msg'] = "No such query type" . $_REQUEST['query'];
    }
    echo json_encode($result);
}
開發者ID:Tocknicsu,項目名稱:crud,代碼行數:19,代碼來源:ajax.php

示例6: array2xml

/**
 * 
 * @param unknown $root
 * @param unknown $array
 * @param number $level
 * @return string
 */
function array2xml($root, $array, $level = 0)
{
    if (is_integer($root)) {
        $root = "entry";
    }
    if (!$level) {
        $xml = "<?xml version='1.0' encoding='utf-8'?><{$root}>";
    } else {
        $xml = "<{$root}>";
    }
    foreach ($array as $key => $value) {
        if (is_array($value)) {
            $xml .= array2xml($key, $value, $level + 1);
        } else {
            $xml .= "<{$key}>" . modify($value) . "</{$key}>";
        }
    }
    $xml .= "</{$root}>";
    return $xml;
}
開發者ID:nibble-arts,項目名稱:feedback,代碼行數:27,代碼來源:array2xml.php

示例7: expiry

 public static function expiry($type, $value)
 {
     $now = date("Y-m-d H:i:s");
     //adjust the expiry by hours
     if ($type == 'H') {
         //$tz = new \DateTimeZone('Europe/London');
         $date = new \DateTime($now);
         $date->modify('+' . $value . ' hours');
         return $date->format('Y-m-d H:i:s');
     } else {
         if ($type == 'D') {
             //$tz = new \DateTimeZone('Europe/London');
             $date = new \DateTime($now);
             $date->modify('+' . $value . ' day');
             return $date->format('Y-m-d H:i:s');
         } else {
             if ($type == 'M') {
                 $date - new \DateTime($now);
                 $date = modify('+' . $value . ' minute');
                 return $date->format('Y-m-d H:i:s');
             }
         }
     }
 }
開發者ID:vampirethura,項目名稱:modelvillage,代碼行數:24,代碼來源:Generate.php

示例8: modify

        }
        return $output;
    }
    function modify($input)
    {
        $output = "";
        $spaces = 0;
        for ($i = 0; $input[$i] != '.'; ++$i) {
            $output .= $input[$i];
            $output .= "<br>";
        }
        return $output;
    }
    echo "<table>\n";
    echo "  <tr>  ";
    echo "<th></th>  ";
    for ($j = 0; $j < $co; ++$j) {
        echo "<th>" . modify(format_it($id_to_name[$j])) . "</th>  ";
    }
    echo "<tr>\n";
    for ($i = 0; $i < $co; ++$i) {
        echo "  <tr>  ";
        echo "<td>" . format_it($id_to_name[$i]) . "</td>  ";
        for ($j = 0; $j < $co; ++$j) {
            echo "<td>" . $matrix[$i][$j] . "</td>  ";
        }
        echo "<tr>\n";
    }
    echo "</table>\n";
}
mysqli_close($conn);
開發者ID:2dor,項目名稱:sociometric-test,代碼行數:31,代碼來源:print_matrix.php

示例9: modify

</tbody>
</table>
<div class="page"><?php 
echo pagination::html($record_count);
?>
</div>
</div>

<div class="blank10"></div>
<input type="hidden" name="batch" value="">

<input  class="btn_a" type="button" value=" 排序 " name="order" onclick="this.form.action='<?php 
echo modify('act/batch', true);
?>
'; this.form.batch.value='order'; this.form.submit();"/>
&nbsp;&nbsp;
移動分類:<?php 
echo form::select('typeid', 0, type::option());
?>
&nbsp;
<input  class="btn_b" type="button" value=" 移動 " name="delete" onclick="if(getSelect(this.form) && confirm('確實要移動ID為('+getSelect(this.form)+')的類嗎?')){this.form.action='<?php 
echo modify('act/batch', true);
?>
'; this.form.batch.value='move'; this.form.submit();}"/>
</form>





開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:25,代碼來源:#list.php

示例10: doRegister

 function doRegister()
 {
     global $gorumroll, $lll, $gorumuser, $noahsRegisterScript, $noahsHost, $noahVersion;
     hasAdminRights($isAdm);
     if (!$isAdm) {
         LocationHistory::rollBack(new AppController("/"));
     }
     JavaScript::addCss(CSS_DIR . "/checkconf.css?{$noahVersion}");
     $_GS = new GlobalStat();
     if (!$_GS->reg) {
         $_GS->reg = md5(uniqid(rand(), true));
     }
     $_GS->company = $_POST["company"];
     $_GS->firstName = $_POST["firstName"];
     $_GS->lastName = $_POST["lastName"];
     $_GS->email = $_POST["email"];
     $data = $this->getTransferData($_GS, TRUE);
     if (($result = $this->getVersionInfo($noahsHost, "POST", $noahsRegisterScript, $data)) === FALSE) {
         View::assign("checkTitle", $lll["unableToConnectNoah"]);
     } else {
         if (strstr($result, "Registration:OK")) {
             View::assign("checkTitle", $lll["noahRegistrationSuccessfull"]);
             $_GS->registered = TRUE;
         } else {
             View::assign("checkTitle", $lll["noahRegistrationFalseResponse"]);
         }
     }
     modify($_GS);
     View::assign("report", array());
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:30,代碼來源:checkconf.php

示例11: session_start

<?php

session_start();
?>

<?php 
if (isset($_POST['action'])) {
    if ($_POST['action'] == "BOB") {
        session_destroy();
    } else {
        if ($_POST['action'] == "modify") {
            modify($_POST['quan'], $_POST['item']);
        } else {
            store();
        }
    }
}
if (isset($_POST['remove'])) {
    clear();
}
if (isset($_POST['print'])) {
    printa($_POST['print']);
    exit;
}
function store()
{
    if (!isset($_SESSION['cart'])) {
        $_SESSION['cart'] = array();
    }
    $ticket = $_POST['action'];
    $screening = array("movie" => $_POST['movID'], "day" => $_POST['day'], "time" => $_POST['time'], "seats" => array($ticket => array("quantity" => $_POST['quan'])));
開發者ID:rmit-s3529386-daniel-bugeja,項目名稱:wp_assignment3,代碼行數:31,代碼來源:cartAdd.php

示例12: if

<div id="tagscontent" class="right_box">

<form method="post" name="form1" action="<?php if(front::$act=='edit') $id="/id/".$data[$primary_key]; else $id=''; echo modify("/act/".front::$act."/table/".$table.$id);?>"  onsubmit="return checkform();">
<input type="hidden" name="onlymodify" value=""/>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="table1">
<thead>
<tr class="th">
<th colspan="3">編輯投票</th>
</tr>
</thead>
<tbody>
<tr>
<td width="19%" align="right">標題</td>
<td width="1%">&nbsp;</td>
<td width="70%">{form::getform('title',$form,$field,$data)} </td>
</tr>
<tr>
<td width="19%" align="right">類型</td>
<td width="1%">&nbsp;</td>
<td width="70%">{form::getform('type',$form,$field,$data)}</td>
</tr>
</tbody>
</table>
<div class="blank20"></div>
<input type="submit" name="submit" value="提交" class="btn_a"/>
</form>
</div>
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:27,代碼來源:edit.php

示例13: confirm

    ?>
</td>
<td align="center" ><?php 
    if ($htmlrule['cate'] == 'archive') {
        ?>
內容<?php 
    }
    if ($htmlrule['cate'] == 'category') {
        ?>
欄目<?php 
    }
    ?>
</td>
<td align="center" >
<span class="hotspot" onmouseover="tooltip.show('確定要刪除嗎?');" onmouseout="tooltip.hide();"><a onclick="javascript: return confirm('確實要刪除嗎?');" href="<?php 
    echo modify("/act/htmlrule/table/{$table}/id/{$id}/o/del");
    ?>
" class="a_del"></a></span>
</td>
</tr>
<?php 
}
?>

        </tbody>
    </table>
<br>
    <table border="0" cellspacing="0" cellpadding="0" id="table1" width="100%">
<thead>
<tr class="th">
<th align="left">&nbsp;&nbsp;&nbsp;&nbsp;添加新規則</th>
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:31,代碼來源:#htmlrule.php

示例14: modify

            return false;
        }
        <?php 
    }
}
?>
        return true;
    }
</script>
<form method="post" name="form1" action="<?php 
if (front::$act == 'edit') {
    $id = "/id/" . $data[$primary_key];
} else {
    $id = '';
}
echo modify("/act/" . front::$act . "/table/" . $table . $id . "/deletestate/" . front::get('deletestate'));
?>
" enctype="multipart/form-data" onsubmit="return checkform();">
    <input type="hidden" name="onlymodify" value=""/>
    <script type="text/javascript" src="<?php 
echo $base_url;
?>
/common/js/ajaxfileupload.js"></script>
    <script type="text/javascript" src="<?php 
echo $base_url;
?>
/common/js/jquery.imgareaselect.min.js"></script>
    <script type="text/javascript" src="<?php 
echo $base_url;
?>
/common/js/ThumbAjaxFileUpload.js"></script>
開發者ID:jiangsuei8,項目名稱:public_php_shl,代碼行數:31,代碼來源:#edit.php

示例15: decreaseSubCatNum

 function decreaseSubCatNum()
 {
     $this->subCatNum--;
     modify($this);
     if ($this->up) {
         $father = new AppCategory();
         $father->id = $this->up;
         load($father);
         $father->decreaseSubCatNum();
         // rekurziv
     }
 }
開發者ID:alencarmo,項目名稱:OCF,代碼行數:12,代碼來源:category.php


注:本文中的modify函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。