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


PHP selectbox函數代碼示例

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


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

示例1: searchRangeDropDown

function searchRangeDropDown($ds, $f2, $cust, $areaindex, $rangeindex = 0)
{
    $cust = floor($cust);
    // dont trust $cust as it could
    // come from form post
    $areaindex = floor($areaindex);
    // display range drop down list
    if ($areaindex) {
        $result = $ds->GetRangeInArea($cust, $areaindex);
    } else {
        $result = $ds->GetRange($cust, 0);
    }
    // don't bother if there are no records, will always display "No range"
    insert($f2, textbrbr(my_("Range (optional)")));
    $lst = array();
    $lst["0"] = my_("No range selected");
    while ($row = $result->FetchRow()) {
        $col = $row["rangeindex"];
        $lst["{$col}"] = inet_ntoa($row["rangeaddr"]) . "/" . inet_ntoa(inet_aton(ALLNETS) - $row["rangesize"] + 1) . "/" . inet_bits($row["rangesize"]) . " - " . $row["descrip"];
    }
    insert($f2, selectbox($lst, array("name" => "rangeindex", "onChange" => "submit()"), $rangeindex));
    return $rangeindex;
}
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:23,代碼來源:searchallform.php

示例2: selectbox

 //
 // If they haven't selected a forum for pruning yet then
 // display a select box to use for pruning.
 //
 if (empty($HTTP_POST_VARS[POST_FORUM_URL])) {
     //
     // Output a selection table if no forum id has been specified.
     //
     $template->set_filenames(array('body' => 'forum_prune_select_body.tpl'));
     $select_list = '<select name="' . POST_FORUM_URL . '">';
     $select_list .= '<option value="-1">' . $lang['All_Forums'] . '</option>';
     for ($i = 0; $i < count($forum_rows); $i++) {
         $select_list .= '<option value="' . $forum_rows[$i]['forum_id'] . '">' . $forum_rows[$i]['forum_name'] . '</option>';
     }
     $select_list .= '</select>';
     $select_list = selectbox(POST_FORUM_URL, false, '', true);
     //
     // Assign the template variables.
     //
     $template->assign_vars(array('L_FORUM_PRUNE' => $lang['Forum_Prune'], 'L_SELECT_FORUM' => $lang['Select_a_Forum'], 'L_LOOK_UP' => $lang['Look_up_Forum'], 'S_FORUMPRUNE_ACTION' => append_sid("admin_forum_prune.{$phpEx}"), 'S_FORUMS_SELECT' => $select_list));
 } else {
     $forum_id = intval($HTTP_POST_VARS[POST_FORUM_URL]);
     //
     // Output the form to retrieve Prune information.
     //
     $template->set_filenames(array('body' => 'forum_prune_body.tpl'));
     $forum_name = $forum_id == -1 ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
     $prune_data = $lang['Prune_topics_not_posted'] . " ";
     $prune_data .= '<input class="post" type="text" name="prunedays" size="4"> ' . $lang['Days'];
     $hidden_input = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
     //
開發者ID:BackupTheBerlios,項目名稱:phpbbsfp,代碼行數:31,代碼來源:admin_forum_prune.php

示例3: selectbox

<td valign="top">

<h3>
<img src="img/16/exit.png" title="Stop" onClick="stop_countdown(interval);">
<span id="counter"><?php 
    echo $refresh;
    ?>
</span>
</h3>
<img src="img/16/form.png" title="<?php 
    echo $limlbl;
    ?>
"> 
<select size="1" name="elm">
<?php 
    selectbox("limit", $elm);
    ?>
</select>

</td>
<th width="80">
	
<input type="submit" name="sho" value="<?php 
    echo $sholbl;
    ?>
">
<p>
<input type="hidden" name="off" value="<?php 
    echo $nof;
    ?>
">
開發者ID:pl0o0f,項目名稱:nedi-puppet,代碼行數:31,代碼來源:Monitoring-Events.php

示例4: isset

// set language
isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']);
//setdefault("window",array("bgcolor"=>"white"));
//setdefault("table",array("cellpadding"=>"0"));
//setdefault("text",array("size"=>"2"));
$title = my_("Display subnet information obtained from a routing table");
newhtml($p);
$w = myheading($p, $title, true);
// explicitly cast variables as security measure against SQL injection
list($cust) = myRegister("I:cust");
// display opening text
insert($w, heading(3, "{$title}."));
insert($w, text(my_("Display subnet information obtained from a routing table will show the routing table information on the left of the screen and the corresponding entries in the database on the right. If there are entries on both sides of the table, the subnet exists in the routing table and the database. If there are only entries on the left, the subnet only exists in the routing table. The same is true for the right hand side. If you click on the left, you can add the subnet to the database. If you click on the right, you can view the existing database information.")));
$ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database"));
// start form
insert($w, $f = form(array("method" => "post", "action" => "displayrouter.php")));
$cust = myCustomerDropDown($ds, $f, $cust, $grps, FALSE) or myError($w, $p, my_("No customers"));
insert($f, textbrbr(my_("IP address of device to query")));
insert($f, span(my_("The device must be SNMP capable"), array("class" => "textSmall")));
insert($f, input_text(array("name" => "ipaddr", "size" => "15", "maxlength" => "15")));
insert($f, textbrbr(my_("Community string")));
$community = SNMP_COMMUNITY == "" ? "public" : SNMP_COMMUNITY;
insert($f, password(array("name" => "community", "value" => $community, "size" => "20", "maxlength" => "20")));
insert($f, textbrbr(my_("Router type")));
insert($f, span(my_("Type 'Generic' will work for most routers"), array("class" => "textSmall")));
$lst = array("generic" => my_("Generic"), "riverstone" => "RiverStone", "juniper" => "Juniper");
insert($f, selectbox($lst, array("name" => "rtrtype")));
insert($f, generic("br"));
insert($f, submit(array("value" => my_("Submit"))));
insert($f, freset(array("value" => my_("Clear"))));
printhtml($p);
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:31,代碼來源:displayrouterform.php

示例5: insert

// save customer name for actual post of data
insert($f2, hidden(array("name" => "cust", "value" => "{$cust}")));
insert($f2, hidden(array("name" => "areaindex", "value" => "{$areaindex}")));
myRangeDropDown($ds, $f2, $cust, $areaindex);
insert($f2, block("<p>"));
insert($f2, $con = container("fieldset", array("class" => "fieldset")));
insert($con, $legend = container("legend", array("class" => "legend")));
insert($legend, text(my_("Search criteria")));
myFocus($p, "ENTRY", "ipaddr");
insert($con, textbr(my_("Subnet network address (leave blank if range selected)")));
insert($con, span(my_("Partial subnet addresses can be used eg. 172.20"), array("class" => "textSmall")));
insert($con, input_text(array("name" => "ipaddr", "size" => "15", "maxlength" => "15")));
insert($con, textbr());
insert($con, checkbox(array("name" => "searchin", "value" => "1", "onchange" => "document.ENTRY.jump.checked=document.ENTRY.searchin.checked;"), my_("Match any IP address in subnet")));
insert($con, checkbox(array("name" => "jump", "value" => "1"), my_("Jump to IP address record if found")));
insert($con, textbr());
insert($con, span(my_("Enter a complete ip address in above field and select the above options to go to the address record or subnet record"), array("class" => "textSmall")));
if (DBF_TYPE == "mysql" or DBF_TYPE == "maxsql" or DBF_TYPE == "postgres7") {
    insert($con, textbrbr(my_("Description (only display networks matching the regular expression)")));
} else {
    insert($con, textbrbr(my_("Description (only display networks containing)")));
}
insert($con, input_text(array("name" => "descrip", "size" => "80", "maxlength" => "80")));
insert($con, textbrbr(my_("Display subnets larger than")));
insert($con, selectbox(array("0" => my_("Display all subnets"), "1" => "255.255.255.255/32 - host", "2" => "255.255.255.254/31 - 2 hosts", "4" => "255.255.255.252/30 - 4 hosts", "8" => "255.255.255.248/29 - 8 hosts", "16" => "255.255.255.240/28 - 16 hosts", "32" => "255.255.255.224/27 - 32 hosts", "64" => "255.255.255.192/26 - 64 hosts", "128" => "255.255.255.128/25 - 128 hosts", "256" => "255.255.255.0/24 - 256 hosts (class C)", "512" => "255.255.254.0/23 - 512 hosts", "1024" => "255.255.252.0/22 - 1k hosts", "2048" => "255.255.248.0/21 - 2k hosts", "4096" => "255.255.240.0/20 - 4k hosts", "8192" => "255.255.224.0/19 - 8k hosts", "16384" => "255.255.192.0/18 - 16k hosts", "32768" => "255.255.128.0/17 - 32k hosts", "65536" => "255.255.0.0/16 - 64k hosts (class B)", "131072" => "255.254.0.0/15 - 128k hosts", "262144" => "255.252.0.0/14 - 256k hosts"), array("name" => "size")));
insert($con, textbr());
insert($con, generic("br"));
insert($f2, submit(array("value" => my_("Submit"))));
insert($f2, freset(array("value" => my_("Clear"))));
myCopyPaste($f2, "ipplanCPdisbaseform", "ENTRY");
printhtml($p);
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:31,代碼來源:displaybaseform.php

示例6: isset

// forum_id
$forum_id = 0;
if (isset($HTTP_POST_VARS[POST_FORUM_URL]) || isset($HTTP_GET_VARS[POST_FORUM_URL])) {
    $forum_id = isset($HTTP_POST_VARS[POST_FORUM_URL]) ? intval($HTTP_POST_VARS[POST_FORUM_URL]) : intval($HTTP_GET_VARS[POST_FORUM_URL]);
}
if (isset($HTTP_POST_VARS['fid']) || isset($HTTP_GET_VARS['fid'])) {
    $fid = isset($HTTP_POST_VARS['fid']) ? $HTTP_POST_VARS['fid'] : $HTTP_GET_VARS['fid'];
    if (substr($fid, 0, 1) == POST_FORUM_URL) {
        $forum_id = intval(substr($fid, 1));
    }
}
// selection
if (($select_from || $select_to) && !$cancel) {
    // get the list of forums
    if (function_exists(selectbox)) {
        $list_forums = selectbox('fid', false, POST_FORUM_URL . $forum_id);
    } else {
        $list_forums = make_forum_select(POST_FORUM_URL, false, $forum_id);
    }
    // how many record in the forum
    $nbpages = 0;
    $per_page = intval($board_config['topics_per_page']);
    $sql_merge = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time \n\t\tFROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2\n\t\tWHERE t.forum_id = {$forum_id}\n\t\t\tAND t.topic_poster = u.user_id\n\t\t\tAND p.post_id = t.topic_first_post_id\n\t\t\tAND p2.post_id = t.topic_last_post_id\n\t\t\tAND u2.user_id = p2.poster_id \n\t\t\tAND topic_status <> " . TOPIC_MOVED;
    if (!empty($forum_id)) {
        $sql = $sql_merge;
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not get topics informations', '', __LINE__, __FILE__, $sql);
        }
        $nbitems = $db->sql_numrows($result);
        $nbpages = floor(($nbitems - 1) / $per_page) + 1;
    }
開發者ID:puring0815,項目名稱:OpenKore,代碼行數:31,代碼來源:merge.php

示例7: selectbox

<?php

function selectbox($arr)
{
    echo "<option>Select</option>";
    $i = 0;
    foreach ($arr as $v) {
        $i += 1;
        echo "<option value=" . $i . ">{$v}</option>";
    }
}
switch ($_GET['company']) {
    case 1:
        $companies = array("Apples", "Bananans", "Pineapples");
        break;
    case "3":
        $companies = array("Sour Worms", "Wilsons Toffee", "Bar One");
        break;
    case 2:
        $companies = array("Potato", "Carrot", "Cabbage");
        break;
    default:
        break;
}
selectbox($companies);
開發者ID:beingsane,項目名稱:BusinessEntity,代碼行數:25,代碼來源:ajax1.php

示例8: Search

 function Search()
 {
     unset($this->vars[$this->frmvar]);
     unset($this->vars["block"]);
     unset($this->vars["expr"]);
     //    $url=my_http_build_query($vars);
     // start form
     insert($this->w, $f = form(array("name" => "SEARCH", "method" => $this->method, "action" => $_SERVER["PHP_SELF"])));
     insert($f, $con = container("fieldset", array("class" => "fieldset")));
     insert($con, $legend = container("legend", array("class" => "legend")));
     insert($legend, text($this->legend));
     if ($this->expr_disp) {
         $lst = array("START" => my_("Starts with"), "END" => my_("Ends with"), "LIKE" => my_("Contains"), "NLIKE" => my_("Does not contain"), "EXACT" => my_("Equal to"));
         if (DBF_TYPE == "mysql" or DBF_TYPE == "maxsql" or DBF_TYPE == "postgres7") {
             $lst["RLIKE"] = my_("Regex contains");
         }
         // only supported by mysql
         if (DBF_TYPE == "mysql" or DBF_TYPE == "maxsql") {
             $lst["NRLIKE"] = my_("Does not regex contain");
         }
         insert($con, selectbox($lst, array("name" => "expr"), $this->expr));
     }
     insert($con, input_text(array("name" => $this->frmvar, "value" => $this->search, "size" => "20", "maxlength" => "80")));
     foreach ($this->vars as $key => $value) {
         insert($con, hidden(array("name" => "{$key}", "value" => "{$value}")));
     }
     insert($con, submit(array("value" => my_("Submit"))));
     insert($con, block(" <a href='#' onclick='SEARCH." . $this->frmvar . ".value=\"\"; SEARCH.submit();'>" . my_("Reset Search") . "</a>"));
 }
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:29,代碼來源:ipplanlib.php

示例9: insert

insert($q, textbr(my_("IF YOU ARE UPGRADING IPPLAN, BACKUP YOUR DATABASE NOW")));
insert($q, textbr(my_("THERE IS NO WAY TO RECOVER YOUR DATA IF SOMETHING GOES WRONG.")));
insert($q, generic("p"));
insert($q, textbr(my_("THE DISPLAY TEMPLATES HAVE MOVED TO A DIFFERENT DIRECTORY - READ THE CHANGELOG AND UPGRADE DOC")));
insert($w, $t = container("div", array("class" => "MrMagooInstall")));
insert($t, $s = container("ul"));
insert($s, $l1 = container("li"));
insert($l1, textb(my_("For security purposes, it is highly recomended that IPPlan is installed on an SSL Webserver.")));
insert($s, generic("br"));
insert($s, $l2 = container("li"));
insert($l2, textb(my_("Production systems need to use a transaction-aware database table. Do not use MYISAM (use INNODB) and enable it in config.php")));
insert($s, generic("br"));
insert($s, $l3 = container("li"));
insert($l3, textb(my_("Read all Instructions carefully before proceeding!")));
insert($w, generic("br"));
insert($w, block(my_("Have you read the <a href=\"http://iptrack.sourceforge.net/doku.php?id=faq\">FAQ</a>? How about the <a href=\"http://iptrack.sourceforge.net/documentation/\">User Manual</a>? ")));
insert($w, text(my_("Have you read the UPGRADE document if upgrading?")));
insert($w, generic("br"));
insert($w, generic("br"));
insert($w, textbrbr(my_("What would you like to do today?")));
insert($w, $f = form(array("name" => "THISFORM", "method" => "POST", "action" => "schemacreate.php")));
insert($f, selectbox(array("0" => "Upgrade", "1" => "New Installation"), array("name" => "new")));
insert($f, generic("br"));
insert($f, generic("br"));
insert($f, textbr(my_("Would you like us to run the SQL against the database defined in config.php or would you rather print it to the screen so you can do it yourself?")));
insert($f, selectbox(array("0" => my_("Run the SQL Now"), "1" => my_("Just print it to the screen")), array("name" => my_("display"))));
insert($f, generic("br"));
insert($f, textbr(my_("If you are displaying the schema, please remove the comments with a text editor before executing into your database.")));
insert($f, generic("br"));
insert($f, submit(array("value" => my_("Go!"))));
printhtml($p);
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:31,代碼來源:install.php

示例10: explode

<input type="hidden" name="usr" value="<?= $usr[0] ?>">
<select size="1" name="inv">
<?php

$vid = explode(" ",$usr[15]);
$inv = array_shift($vid);
$opv = array_shift($vid);										# Operator has no spaces (not regexp is !~ since 1.0.9)
$stv = implode(' ',preg_replace('/["\']/','',$vid));							# Now string can contain spaces, pre 1.0.9 had quotes
foreach ($dcol as $k => $v){
       echo "<option value=\"$k\"".( ($inv == $k)?" selected":"").">$v\n";
}
?>
</select>

<select size="1" name="opv">
<?php selectbox("oper",$opv) ?>
</select><br>
<input type="text" name="stv" size="16" value="<?= $stv ?>" onfocus="select();"  onchange="this.form.submit();" title="Device <?= $acslbl ?> <?= $limlbl ?>">
<?= (($stv)?"<a href=\"Devices-List.php?in[]=$inv&op[]=$opv&st[]=$stv\"><img src=\"img/16/eyes.png\" title=\"Device $lstlbl\"></a>":"") ?>
</form> 
<?}?>

</td>
<th>
<?php
GroupButton($usr[0],$usr[2],1,'ucfg');
GroupButton($usr[0],$usr[2],2,'net');
GroupButton($usr[0],$usr[2],4,'ring');
GroupButton($usr[0],$usr[2],8,'bino');
GroupButton($usr[0],$usr[2],16,'umgr');
GroupButton($usr[0],$usr[2],32,'ugrp');
開發者ID:pl0o0f,項目名稱:nedi-puppet,代碼行數:31,代碼來源:User-Accounts.php

示例11: htmlspecialchars

<tr>
<td class="l_form">電話番號</td>
<td class="r_form"><input type="text" name="c_tel" id="" class="txt_area01" value="<?php 
echo htmlspecialchars($_POST['c_tel']);
?>
" /><br>
(攜帯・PHSでも可)
</td>
</tr>
<tr>
<td class="l_form">ご住所</td>
<td class="r_form">
	<select name="c_area">
		<option value="">【選択して下さい】</option>
		<?php 
echo selectbox($__Area, $_POST['c_area'], true);
?>
	</select>
</td>
</tr>
<tr>
<td class="l_form">性別</td>
<td class="r_form">
	<input type="radio" name="c_sex" value="2" <?php 
echo checked($_POST['c_sex'], "2");
?>
 /> <?php 
echo $__Sex['2'];
?>
&nbsp;&nbsp;
	<input type="radio" name="c_sex" value="1" <?php 
開發者ID:aim-web-projects,項目名稱:ueno-chuoh,代碼行數:31,代碼來源:contact.php

示例12: insertCreateUserForm

function insertCreateUserForm($w, $ds)
{
    list($userid, $userdescrip, $useremail, $grp) = myRegister("S:userid S:userdescrip S:useremail S:grp");
    insert($w, $f = form(array("method" => "post", "action" => $_SERVER["PHP_SELF"])));
    insert($f, hidden(array("name" => "action", "value" => "parsecreateuserform")));
    insert($f, $con = container("fieldset", array("class" => "fieldset")));
    insert($con, $legend = container("legend", array("class" => "legend")));
    insert($legend, text(my_("Create new user")));
    insert($con, textbr(my_("User-id (case sensitive!):")));
    insert($con, input_text(array("name" => "userid", "value" => "{$userid}", "size" => "20", "maxlength" => "40")));
    insert($con, textbrbr(my_("User's fullname:")));
    insert($con, input_text(array("name" => "userdescrip", "value" => "{$userdescrip}", "size" => "40", "maxlength" => "80")));
    insert($con, textbrbr(my_("User's e-mail:")));
    insert($con, input_text(array("name" => "useremail", "value" => "{$useremail}", "size" => "40", "maxlength" => "64")));
    if (AUTH_INTERNAL) {
        insert($con, textbrbr(my_("Password (case sensitive!):")));
        insert($con, password(array("name" => "password1", "size" => "20", "maxlength" => "40")));
        insert($con, textbrbr(my_("Password (again):")));
        insert($con, password(array("name" => "password2", "size" => "20", "maxlength" => "40")));
    }
    $result2 = $ds->GetGrps();
    $lst = array("" => "No group");
    while ($row = $result2->FetchRow()) {
        $col = $row["grp"];
        $lst["{$col}"] = $row["grp"] . " - " . $row["grpdescrip"];
    }
    insert($con, textbrbr(my_("Group")));
    insert($con, selectbox($lst, array("name" => "grp"), $grp));
    insert($f, generic("br"));
    insert($f, submit(array("value" => my_("Create User"))));
    insert($f, freset(array("value" => my_("Clear"))));
}
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:32,代碼來源:usermanager.php

示例13: insert

    insert($f1, hidden(array("name" => "cust", "value" => "{$cust}")));
    insert($f1, hidden(array("name" => "ipaddr", "value" => "{$ipaddr}")));
    insert($f1, hidden(array("name" => "descrip", "value" => "{$descrip}")));
    insert($f1, hidden(array("name" => "size", "value" => "{$size}")));
    insert($f1, hidden(array("name" => "rangeindex", "value" => "{$rangeindex}")));
} else {
    // ugly kludge with global variable!
    $displayall = TRUE;
    $cust = myCustomerDropDown($ds, $f1, $cust, $grps) or myError($w, $p, my_("No customers"));
}
// show all areas, even ones with no ranges - need for create page
$areaindex = myAreaDropDown($ds, $f1, $cust, $areaindex, TRUE);
insert($w, $f2 = form(array("name" => "ENTRY", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
// save customer name for actual post of data
insert($f2, hidden(array("name" => "cust", "value" => "{$cust}")));
// save area index for actual post of data
insert($f2, hidden(array("name" => "areaindex", "value" => "{$areaindex}")));
if ($action == "modify") {
    insert($f2, hidden(array("name" => "rangeindex", "value" => "{$rangeindex}")));
    insert($f2, hidden(array("name" => "action", "value" => "modify")));
}
insert($f2, textbrbr(my_("Range address")));
insert($f2, input_text(array("name" => "ipaddr", "value" => "{$ipaddr}", "size" => "15", "maxlength" => "15")));
insert($f2, textbrbr(my_("Description")));
insert($f2, input_text(array("name" => "descrip", "value" => "{$descrip}", "size" => "80", "maxlength" => "80")));
insert($f2, textbrbr(my_("Range size/mask")));
insert($f2, selectbox(array("4" => "255.255.255.252/30 - 4 hosts", "8" => "255.255.255.248/29 - 8 hosts", "16" => "255.255.255.240/28 - 16 hosts", "32" => "255.255.255.224/27 - 32 hosts", "64" => "255.255.255.192/26 - 64 hosts", "128" => "255.255.255.128/25 - 128 hosts", "256" => "255.255.255.0/24 - 256 hosts (class C)", "512" => "255.255.254.0/23 - 512 hosts", "1024" => "255.255.252.0/22 - 1k hosts", "2048" => "255.255.248.0/21 - 2k hosts", "4096" => "255.255.240.0/20 - 4k hosts", "8192" => "255.255.224.0/19 - 8k hosts", "16384" => "255.255.192.0/18 - 16k hosts", "32768" => "255.255.128.0/17 - 32k hosts", "65536" => "255.255.0.0/16 - 64k hosts (class B)", "131072" => "255.254.0.0/15 - 128k hosts", "262144" => "255.252.0.0/14 - 256k hosts", "524288" => "255.248.0.0/13", "1048576" => "255.240.0.0/12", "2097152" => "255.224.0.0/11", "4194304" => "255.192.0.0/10", "8388608" => "255.128.0.0/9", "16777216" => "255.0.0.0/8 (class A)"), array("name" => "size"), $size));
insert($f2, generic("br"));
insert($f2, submit(array("value" => my_("Submit"))));
insert($f2, freset(array("value" => my_("Clear"))));
printhtml($p);
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:31,代碼來源:createrange.php

示例14: myheading

$w = myheading($p, $title);
// display opening text
insert($w, heading(3, "{$title}."));
insert($w, text(my_("Import network data from flat ascii files.  The file should contain three columns each delimited by TAB. The first column contains the IP base address, the second the description and the third the mask either in dotted decimal format or in bit format.")));
insert($w, block("<p>"));
insert($w, text(my_("If the import file has more than three columns, each additional column will be added to the user defined fields defined in the basetemplate.xml file in the order specified in the template.")));
insert($w, block("<p>"));
insert($w, textbr(my_("If an error occurs during the import, the process will stop. Records that have been successfully imported should be deleted from the import file, the error corrected and the import resumed.")));
$ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database"));
// start form
insert($w, $f = form(array("method" => "post", "enctype" => "multipart/form-data", "action" => "importbase.php")));
$cust = myCustomerDropDown($ds, $f, 0, 0, FALSE) or myError($w, $p, my_("No customers"));
$result = $ds->GetGrps();
$lst = array();
while ($row = $result->FetchRow()) {
    $col = $row["grp"];
    $lst["{$col}"] = $row["grpdescrip"];
}
if (empty($lst)) {
    myError($w, $p, my_("You first need to create some groups!"));
}
insert($f, textbrbr(my_("Admin Group")));
insert($f, selectbox($lst, array("name" => "admingrp")));
insert($f, textbrbr(my_("File name")));
insert($f, hidden(array("name" => "MAX_FILE_SIZE", "value" => MAXUPLOADSIZE)));
insert($f, inputfile(array("name" => "userfile")));
insert($f, generic("br"));
insert($f, submit(array("value" => my_("Submit"))));
insert($f, freset(array("value" => my_("Clear"))));
$result->Close();
printhtml($p);
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:31,代碼來源:importbaseform.php

示例15: insert

// display opening text
insert($w, heading(3, "{$title}."));
insert($w, block("<br>" . my_("Import IP details data in XML format. The data is in the same format generated by <a HREF=\"http://www.insecure.org\">NMAP's</a> -oX parameter. This is useful to scan and obtain records for sites that have no previous information.")));
insert($w, block("<p>"));
insert($w, text(my_("Import IP details data from flat ascii files.  The file should contain a minimum of seven columns each delimited by TAB: ")));
insert($w, text(my_("The columns are imported in the following order: IP address, user, location, description, hostname, telephone number and mac address.")));
insert($w, block("<p>"));
insert($w, text(my_("If the import file has more than seven columns, each additional column will be added to the user defined fields defined in the iptemplate.xml file in the order specified in the template.")));
insert($w, block("<p>"));
insert($w, text(my_("If an error occurs during the import, the process will stop. Records that have been successfully imported should be deleted from the import file, the error corrected and the import resumed.")));
insert($w, block("<p>"));
insert($w, text(my_("NOTE: Any number of IP address records for various subnets can be in the file.  Any existing information will be overwritten.") . " "));
insert($w, text(my_("Imported addresses will only be added to existing subnets.") . " "));
insert($w, textbr(my_("If the merge flag is set, any fields that are empty or contain NULL will not be overwritten.")));
$ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database"));
// start form
insert($w, $f = form(array("method" => "post", "enctype" => "multipart/form-data", "action" => "importip.php")));
$cust = myCustomerDropDown($ds, $f, 0, 0, FALSE) or myError($w, $p, my_("No customers"));
insert($f, textbrbr(my_("File name")));
insert($f, hidden(array("name" => "MAX_FILE_SIZE", "value" => MAXUPLOADSIZE)));
insert($f, inputfile(array("name" => "userfile")));
insert($f, textbrbr(my_("Format")));
insert($f, selectbox(array("text" => my_("Standard fields - text format"), "xml" => my_("Standard fields - NMAP XML format")), array("name" => "format")));
insert($f, generic("br"));
insert($f, generic("br"));
insert($f, checkbox(array("NAME" => "append"), " " . my_("Merge"), $c = ""));
insert($f, generic("br"));
insert($f, generic("br"));
insert($f, submit(array("value" => my_("Submit"))));
insert($f, freset(array("value" => my_("Clear"))));
printhtml($p);
開發者ID:hetznerZA,項目名稱:ipplan,代碼行數:31,代碼來源:importipform.php


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