当前位置: 首页>>代码示例>>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;未经允许,请勿转载。