コード例 #1
0
ファイル: searchallform.php プロジェクト: hetznerZA/ipplan
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;
}
コード例 #2
0
 //
 // 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 . '" />';
     //
コード例 #3
0
<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;
    ?>
">
コード例 #4
0
// 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);
コード例 #5
0
ファイル: displaybaseform.php プロジェクト: hetznerZA/ipplan
// 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);
コード例 #6
0
ファイル: merge.php プロジェクト: puring0815/OpenKore
// 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;
    }
コード例 #7
0
ファイル: ajax1.php プロジェクト: beingsane/BusinessEntity
<?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);
コード例 #8
0
ファイル: ipplanlib.php プロジェクト: hetznerZA/ipplan
 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>"));
 }
コード例 #9
0
ファイル: install.php プロジェクト: hetznerZA/ipplan
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);
コード例 #10
0
ファイル: User-Accounts.php プロジェクト: pl0o0f/nedi-puppet
<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');
コード例 #11
0
<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 
コード例 #12
0
ファイル: usermanager.php プロジェクト: hetznerZA/ipplan
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"))));
}
コード例 #13
0
ファイル: createrange.php プロジェクト: hetznerZA/ipplan
    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);
コード例 #14
0
ファイル: importbaseform.php プロジェクト: hetznerZA/ipplan
$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);
コード例 #15
0
ファイル: importipform.php プロジェクト: hetznerZA/ipplan
// 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);
コード例 #16
0
ファイル: changesettings.php プロジェクト: hetznerZA/ipplan
if (extension_loaded("gettext") and LANGCHOICE) {
    insert($con, block("<br>Language:<br>"));
    //      insert($f,block('<select NAME="lang" ONCHANGE="submit()">'));
    insert($con, block('<select NAME="lang">'));
    foreach ($iso_codes as $key => $value) {
        // look only at language part of cookie
        if (isset($_COOKIE["ipplanLanguage"]) and substr($_COOKIE['ipplanLanguage'], 0, 5) == $key) {
            insert($con, block('<option VALUE="' . $key . '" SELECTED>' . $value . "\n"));
        } else {
            insert($con, block('<option VALUE="' . $key . '">' . $value . "\n"));
        }
    }
    insert($con, block("</select>"));
    insert($con, textbr());
}
// Konqueror and Safari browsers do not support overflow: auto css tag so use custom stylesheet
if (!stristr($_SERVER["HTTP_USER_AGENT"], "konqueror") and !stristr($_SERVER["HTTP_USER_AGENT"], "safari")) {
    insert($f, textbr());
    insert($con, generic("br"));
    insert($con, block(my_("Theme:")));
    insert($con, generic("br"));
    $theme = isset($_COOKIE["ipplanTheme"]) ? $_COOKIE["ipplanTheme"] : "";
    $themelist = array();
    foreach (array_keys($config_themes) as $th) {
        $themelist[$th] = $th;
    }
    insert($con, selectbox($themelist, array("name" => "theme"), $theme));
}
insert($f, submit(array("value" => my_("Submit"))));
insert($f, freset(array("value" => my_("Clear"))));
printhtml($p);
コード例 #17
0
?>
 class="contact02" id="20"><label for="20">E-mail </label></td>
				</tr>
				<tr>
					<td class="box04" colspan="2"></td>
				</tr>

				<tr>
					<th class="box01" colspan="2">ご連絡ご希望時間帯</th>
				</tr>
				<tr>
					<td class="box02" colspan="2">
						<select name="c_wtime" class="contact08">
							<option value="">ご希望時間をお選びください</option>
							<?php 
echo selectbox($__Time, $_POST['c_wtime'], true);
?>
						</select>
					</td>
				</tr>

				<tr>
					<th class="box03" colspan="2">当日手術希望されますか</th>
				</tr>
				<tr>
					<td class="box04" colspan="2">
						<input type="radio" name="c_wish" value="1" <?php 
echo checked($_POST['c_wish'], "1");
?>
 class="contact02" id="22"><label for="22">当日治療を希望</label><br />
						<input type="radio" name="c_wish" value="2" <?php 
コード例 #18
0
			<select name="c_date3_mm">
				<option value="">--</option>
				<?php 
echo selectbox($__Month, $_POST['c_date3_mm'], true);
?>
			</select>月
			<select name="c_date3_dd">
				<option value="">--</option>
				<?php 
echo selectbox($__Day, $_POST['c_date3_dd'], true);
?>
			</select>日
			<select name="c_date3_tt">
				<option value="">---</option>
				<?php 
echo selectbox($__Time, $_POST['c_date3_tt'], true);
?>
			</select><br />
			※インターネットでのご予約は、本日より3日後以降の希望日と限らさせていただきます。<br />
			(3日以内でのご希望日の場合は、お電話にて承ります。)
		</td>
	</tr>
	<tr>
		<th>※治療内容</th>
		<td>
			【診療科目】<br />
			<?php 
foreach ($__Care as $f1 => $v1) {
    ?>
				<input type="checkbox" name="c_care<?php 
    echo $f1;
コード例 #19
0
                <input type="radio" name="c_call" value="2" <?php 
echo checked($_POST['c_call'], "2");
?>
 />電話
                <input type="radio" name="c_call" value="3" <?php 
echo checked($_POST['c_call'], "3");
?>
 />どちらでも</td>
			</tr>
			<tr>
				<th>ご相談内容<font color="red">※</font></th>
				<td>
					<select name="c_care">
						<option value="">ご相談内容をお選び下さい。</option>
						<?php 
echo selectbox($__SPCare, $_POST['c_care'], true);
?>
					</select>
				</td>
			</tr>
			<tr>
				<th>具体的な内容<font color="red">※</font><br /><span class="f80">(できるだけ詳しく)</span></th>
				<td><textarea name="c_memo" rows="5" cols="28"><?php 
echo htmlspecialchars($_POST['c_memo']);
?>
</textarea></td>
			</tr>
		</table>
		
		<p style="text-align:center;"><input type="submit" value="確認"></p>	
		</form>
コード例 #20
0
ファイル: requestip.php プロジェクト: hetznerZA/ipplan
        // remember that customer was blank
    }
    // only make customer same as cookie if customer actually
    // still exists in database, else will cause loop!
    if ($custset) {
        if ($col == $ipplanCustomer) {
            // dont trust cookie
            $cust = floor($ipplanCustomer);
        }
    }
    $lst["{$col}"] = $row["custdescrip"];
}
insert($w, $f = form(array("name" => "ENTRY", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
myFocus($p, "MODIFY", "request");
insert($f, textbrbr(my_("Customer")));
insert($f, selectbox($lst, array("name" => "cust"), $cust));
insert($f, textbrbr(my_("Request details")));
insert($f, span(my_("Enter full details describing the request to enable the administrators to allocate the correct IP address on the network"), array("class" => "textSmall")));
insert($f, input_text(array("name" => "request", "value" => $request, "size" => "80", "maxlength" => "80")));
insert($f, $con = container("fieldset", array("class" => "fieldset")));
insert($con, $legend = container("legend", array("class" => "legend")));
insert($legend, text(my_("User information")));
insert($con, textbr(my_("User")));
insert($con, input_text(array("name" => "user", "value" => $user, "size" => "80", "maxlength" => "80")));
insert($con, textbrbr(my_("Location")));
insert($con, input_text(array("name" => "location", "value" => $location, "size" => "80", "maxlength" => "80")));
insert($con, textbrbr(my_("Device description")));
insert($con, input_text(array("name" => "descrip", "value" => $descrip, "size" => "80", "maxlength" => "80")));
insert($con, textbrbr(my_("Device hostname")));
insert($con, input_text(array("name" => "hname", "value" => $hname, "size" => "80", "maxlength" => "100")));
insert($con, textbrbr(my_("Telephone number")));
コード例 #21
0
ファイル: class.templib.php プロジェクト: hetznerZA/ipplan
 function DisplayTemplate(&$layout)
 {
     //echo "<pre>";var_dump($this->userfld);echo "</pre>";
     foreach ($this->userfld as $field => $val) {
         insert($layout, textbr());
         insert($layout, text($this->userfld["{$field}"]["descrip"]));
         insert($layout, textbr());
         // "name" definition looks strange, but associative arrays
         // in html must not have quotes, something like
         // userfld[fieldname] which will be correctly converted by php
         if ($this->userfld["{$field}"]["type"] == "C") {
             insert($layout, input_text(array("name" => "userfld[{$field}]", "value" => isset($this->userfld["{$field}"]["value"]) ? $this->userfld["{$field}"]["value"] : $this->userfld["{$field}"]["default"], "size" => $this->userfld["{$field}"]["size"], "maxlength" => $this->userfld["{$field}"]["maxlength"])));
         } elseif ($this->userfld["{$field}"]["type"] == "T") {
             insert($layout, textarea(array("name" => "userfld[{$field}]", "cols" => $this->userfld["{$field}"]["size"], "rows" => $this->userfld["{$field}"]["rows"], "maxlength" => $this->userfld["{$field}"]["maxlength"]), isset($this->userfld["{$field}"]["value"]) ? $this->userfld["{$field}"]["value"] : $this->userfld["{$field}"]["default"]));
         } elseif ($this->userfld["{$field}"]["type"] == "S") {
             insert($layout, selectbox($this->userfld["{$field}"]["select"], array("name" => "userfld[{$field}]"), isset($this->userfld["{$field}"]["value"]) ? $this->userfld["{$field}"]["value"] : $this->userfld["{$field}"]["default"]));
         }
         /*
         elseif ($this->userfld["$field"]["type"] == "B") {
             insert($layout,checkbox(array("name"=>"userfld[$field]",
                             "value"=>isset($this->userfld["$field"]["value"]) ? $this->userfld["$field"]["value"] : $this->userfld["$field"]["default"]), "Text"));
         
         }
         */
     }
 }
コード例 #22
0
 class="contact04"/>E-mail
				<input type="radio" name="c_call" value="3" <?php 
echo checked($_POST['c_call'], "3");
?>
 class="contact04"/>どちらでも可能</td>
				</tr>

				

				<tr>
				<td class="contact10">ご連絡ご希望時間帯</td>
				<td class="contact11">
				<select name="c_renraku" class="contact16">
					<option value="">--</option>
					<?php 
echo selectbox($__Time, $_POST['c_renraku'], true);
?>
				</select>
				
				</td>
				</tr>

				<tr>
				<td class="contact10">当日手術希望されますか</td>
				<td class="contact11"><input type="radio" name="c_wish" value="1" <?php 
echo checked($_POST['c_wish'], "1");
?>
 class="contact04"/>当日治療を希望<br />
				<input type="radio" name="c_wish" value="2" <?php 
echo checked($_POST['c_wish'], "2");
?>
コード例 #23
0
<br />
				<input type="radio" name="c_call" value="3" <?php 
echo checked($_POST['c_call'], "3");
?>
 /> <?php 
echo $__Call['3'];
?>
			</td>
		</tr>
		<tr>
			<th>連絡希望時間帯</th>
			<td>時間をお選び下さい
				<select name="c_call_time">
					<option value="">---</option>
					<?php 
echo selectbox($__Time2, $_POST['c_call_time'], true);
?>
				</select>
			</td>
		</tr>
	</table>
	</div>

	<div class="btnClass001"><input type="image" src="./img/f001.jpg" value="確認" /></div>



	</form>
</div></div>
    </div><!-- main -->
コード例 #24
0
ファイル: modifydnsform.php プロジェクト: hetznerZA/ipplan
insert($t, $c = cell());
insert($c, text(my_("Day")));
insert($c, selectbox($days, array("name" => "regday"), $regday));
insert($c, text(my_("Month")));
insert($c, selectbox($months, array("name" => "regmonth"), $regmonth));
insert($c, text(my_("Year")));
insert($c, selectbox($years, array("name" => "regyear"), $regyear));
insert($t, $c = cell());
insert($c, text(my_("Date zone expires")));
insert($t, $c = cell());
insert($c, text(my_("Day")));
insert($c, selectbox($days, array("name" => "expireday"), $expireday));
insert($c, text(my_("Month")));
insert($c, selectbox($months, array("name" => "expiremonth"), $expiremonth));
insert($c, text(my_("Year")));
insert($c, selectbox($years, array("name" => "expireyear"), $expireyear));
insert($f, $con = container("fieldset", array("class" => "fieldset")));
insert($con, $legend = container("legend", array("class" => "legend")));
if ($action == "add") {
    insert($legend, text(my_("Zone SOA information if zone not created via zone transfer")));
} else {
    insert($legend, text(my_("Zone SOA information")));
}
$i = 1;
while ($row2 = $result2->FetchRow()) {
    $hname[$row2["horder"]] = $row2["hname"];
    $i++;
}
// capture data for the export view functionality
$export = new exportForm();
$export->addRow(array("name_server_1", "name_server_2", "name_server_3", "name_server_4", "name_server_5", "name_server_6", "name_server_7", "name_server_8", "name_server_9", "name_server_10"));
コード例 #25
0
    echo "selected";
}
?>
 >Message Sources
<OPTION value="tup" <?php 
if (in_array("tup", $rep)) {
    echo "selected";
}
?>
 >Uptimes
</SELECT></th>
</th>
<th>Limit
<SELECT size=1 name="lim">
<?php 
selectbox("limit", $lim);
?>
</SELECT>
</th>
<th>
<INPUT type="checkbox" name="ord" <?php 
echo $ord ? "checked" : "";
?>
 > alternative order
</th>
</SELECT></th>

<th width=80><input type="submit" name="shw" value="Show"></th>
</tr></table></form><p>
<?php 
if ($rep) {
コード例 #26
0
	echo "<option value=\"$ig\" ";
	if($ig == $grp){echo "selected ";}
	echo (strpos($ig,'0')?"style=\"color:blue\">$igrp[$ig]\n":">- $igrp[$ig]\n");
}
?>
</select>

<img src="img/16/bbrt.png" title="<?= $fltlbl ?> <?= $stco['100'] ?> (<?= $nonlbl ?> <?= $endlbl ?>)"> 
<input type="checkbox" name="end" <?= $end ?> onchange="this.form.submit();">

</th>
<th>
	
<img src="img/16/form.png" title="<?= $limlbl ?>"> 
<select name="lim">
<?php selectbox("limit",$lim) ?>
</select>
</th>
<th width="80"><input type="submit" name="sho" value="<?= $sholbl ?>">
<p>
<input type="hidden" name="off" value="<?= $nof ?>">
<input type="submit" name="p" value=" < ">
<input type="submit" name="n" value=" > ">
</th>
</tr></table></form><p>
<?}?>

<h2><?= ($grp)?$igrp[$grp]:"" ?> <?= $inclbl ?> <?= $lstlbl ?></h2>

<table class="content"><tr class="<?= $modgroup[$self] ?>2">
<th width="80" colspan="2"><img src="img/16/eyes.png"><br><?= $inclbl ?></th>
コード例 #27
0
ファイル: displayswipform.php プロジェクト: hetznerZA/ipplan
insert($con, $legend = container("legend", array("class" => "legend")));
insert($legend, text(my_("Search criteria")));
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")));
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")));
// get filenames with xsl extension from templates directory
$files = array();
if ($dir = @opendir("../templates")) {
    while ($filename = readdir($dir)) {
        if (preg_match("/\\.xsl\$/", $filename)) {
            $files["{$filename}"] = $filename;
        }
    }
    closedir($dir);
}
insert($con, textbrbr(my_("Template")));
insert($con, selectbox($files, array("name" => "filename")));
insert($con, textbrbr(my_("Network name (ntname field on registrar template)")));
insert($con, radio(array("name" => "ntnameopt", "value" => "0"), my_("Generate automatically"), "checked"));
insert($con, radio(array("name" => "ntnameopt", "value" => "1"), my_("Use subnet description")));
insert($con, generic("br"));
insert($f2, submit(array("value" => my_("Submit"))));
insert($f2, freset(array("value" => my_("Clear"))));
myCopyPaste($f2, "ipplanCPswipform", "ENTRY");
printhtml($p);
コード例 #28
0
<br>
<font color="#006400">■</font><font color="#333333" size=2> お支払方法 </font><font color="red">※</font><font color="#333333" size=2> </font><font color="#006400">■</font><br>
	<select name="c_pay" size=1>
		<option value="">支払方法をお選び下さい。</option>
		<?php 
    echo selectbox($__Pay, $_POST['c_pay'], true);
    ?>
	</select>
<br>
<br>
<font color="#006400">■</font><font color="#333333" size=2> アンケート </font><font color="#006400">■</font><br>
<font color="#333333" size=2>お手数ですが、当院のホームページを何でお知りになられましたか?</font><br>
	<select name="c_wfrom" size=1>
		<option value="">アンケートにお答え下さい!</option>
		<?php 
    echo selectbox($__WFrom, $_POST['c_wfrom'], true);
    ?>
	</select>
<br>
<br>
<font color="#333333" size=2> </font><input type=submit value="送信する" /><br>
</form><hr size=1 color="#2838ab">

<?php 
} else {
    if ($view == "2") {
        ?>

<table width="240">
<tr>
<td height="10"></td>
コード例 #29
0
selectbox("comop", $cop);
?>
</SELECT>
</th>
<th valign=top>Condition B<p>
<SELECT size=1 name="inb">
<?php 
foreach ($cols as $k => $v) {
    $selopt = $inb == $k ? "selected" : "";
    echo "<option value=\"{$k}\" {$selopt} >{$v}\n";
}
?>
</SELECT>
<SELECT size=1 name="opb">
<?php 
selectbox("oper", $opb);
?>
</SELECT>
<p><a href="javascript:show_calendar('list.stb');"><img src="img/cal.png" border=0 hspace=8></a>
<input type="text" name="stb" value="<?php 
echo $stb;
?>
" size="25">
</th>
<th valign=top>Display<p>
<SELECT MULTIPLE name="col[]" size=4>
<?php 
foreach ($cols as $k => $v) {
    $selopt = in_array($k, $col) ? "selected" : "";
    echo "<option value=\"{$k}\" {$selopt} >{$v}\n";
}
コード例 #30
0
/**
 * Template_Lite  function plugin
 *
 */
function tpl_function_selectbox($params, &$tpl)
{
    $tpl->CI->load->helper('start');
    return selectbox($params);
}