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


PHP cell函数代码示例

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


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

示例1: shell

function shell()
{
    $cells = array();
    for ($row = 0; $row < 5; $row++) {
        for ($col = 0; $col < 5; $col++) {
            $cells[] = cell($row, $col);
        }
    }
    return "<div class='invader'>" . implode("\n", $cells) . "<div class='clear'></div></div>";
}
开发者ID:pveinberg,项目名称:code,代码行数:10,代码来源:invader.php

示例2: row

function row($label, $input = array(), $settings = false)
{
    if ($input['id']) {
        $id = $input['id'];
    } else {
        $id = $settings['id'];
    }
    if ($settings['content']) {
        $in = $settings['content'];
    } else {
        $in = "";
        if ($settings['prepend']) {
            $in .= $settings['prepend'];
        }
        $in .= '<input type="' . $input['type'] . '" name="' . $input['name'] . '"';
        if (!$input['id']) {
            $in .= ' id="' . $input['name'] . '"';
        } else {
            $in .= ' id="' . $id . '"';
        }
        if ($input['class']) {
            $in .= ' class="' . $input['class'] . '"';
        }
        if ($input['value']) {
            $in .= ' value="' . htmlspecialchars($input['value']) . '"';
        }
        if ($input['ext']) {
            $in .= " " . $input['ext'];
        }
        $in .= ' />';
        if ($settings['append']) {
            $in .= $settings['append'];
        }
    }
    Write('
			<tr class="cell{0}">
				<td>
					<label for="{1}">
						{2}
					</label>
				</td>
				<td>
					{3}
				</td>
			</tr>', cell(), $id, $label, $in);
}
开发者ID:RoadrunnerWMC,项目名称:ABXD-legacy,代码行数:46,代码来源:layout.php

示例3: do_summary

function do_summary(&$count, &$hours, &$room_hash, &$name_hash)
{
    global $enable_periods;
    # Make a sorted array of area/rooms, and of names, to use for column
    # and row indexes. Use the rooms and names hashes built by accumulate().
    # At PHP4 we could use array_keys().
    reset($room_hash);
    while (list($room_key) = each($room_hash)) {
        $rooms[] = $room_key;
    }
    ksort($rooms);
    reset($name_hash);
    while (list($name_key) = each($name_hash)) {
        $names[] = $name_key;
    }
    ksort($names);
    $n_rooms = sizeof($rooms);
    $n_names = sizeof($names);
    echo "<hr><h1>" . (empty($enable_periods) ? get_vocab("summary_header") : get_vocab("summary_header_per")) . "</h1><table border=2 cellspacing=4>\n";
    echo "<tr><td>&nbsp;</td>\n";
    for ($c = 0; $c < $n_rooms; $c++) {
        echo "<td class=\"BL\" align=left><b>{$rooms[$c]}</b></td>\n";
        $col_count_total[$c] = 0;
        $col_hours_total[$c] = 0.0;
    }
    echo "<td class=\"BR\" align=right><br><b>" . get_vocab("total") . "</b></td></tr>\n";
    $grand_count_total = 0;
    $grand_hours_total = 0;
    for ($r = 0; $r < $n_names; $r++) {
        $row_count_total = 0;
        $row_hours_total = 0.0;
        $name = $names[$r];
        echo "<tr><td class=\"BR\" align=right><b>{$name}</b></td>\n";
        for ($c = 0; $c < $n_rooms; $c++) {
            $room = $rooms[$c];
            if (isset($count[$room][$name])) {
                $count_val = $count[$room][$name];
                $hours_val = $hours[$room][$name];
                cell($count_val, $hours_val);
                $row_count_total += $count_val;
                $row_hours_total += $hours_val;
                $col_count_total[$c] += $count_val;
                $col_hours_total[$c] += $hours_val;
            } else {
                echo "<td>&nbsp;</td>\n";
            }
        }
        cell($row_count_total, $row_hours_total);
        echo "</tr>\n";
        $grand_count_total += $row_count_total;
        $grand_hours_total += $row_hours_total;
    }
    echo "<tr><td class=\"BR\" align=right><b>" . get_vocab("total") . "</b></td>\n";
    for ($c = 0; $c < $n_rooms; $c++) {
        cell($col_count_total[$c], $col_hours_total[$c]);
    }
    cell($grand_count_total, $grand_hours_total);
    echo "</tr></table>\n";
}
开发者ID:jwigal,项目名称:emcommdb,代码行数:59,代码来源:report.php

示例4: insert

 insert($t, $c = cell());
 insert($c, text($row["minimum"]));
 $export->addCell($row["minimum"]);
 insert($t, $c = cell());
 insert($c, block("<small>"));
 insert($c, block($result->UserTimeStamp($row["lastmod"], "M d Y H:i:s")));
 $export->addCell($row["lastmod"]);
 insert($c, block("<br>"));
 insert($c, block($result->UserTimeStamp($row["lastexp"], "M d Y H:i:s")));
 insert($c, block("</small>"));
 $export->addCell($row["lastexp"]);
 insert($t, $c = cell());
 insert($c, text($row["userid"]));
 $export->addCell($row["userid"]);
 $export->saveRow();
 insert($t, $c = cell());
 insert($c, block("<small>"));
 insert($c, anchor($_SERVER["PHP_SELF"] . "?cust={$cust}&dataid=" . $row["data_id"] . "&action=delete&domain=" . urlencode($row["domain"]), my_("Delete DNS Zone"), $ipplanParanoid ? array("onclick" => "return confirm('" . my_("Are you sure?") . "')") : FALSE));
 insert($c, block(" | "));
 insert($c, anchor("modifydnsform.php?cust={$cust}&dataid=" . $row["data_id"] . "&action=edit" . "&domain=" . urlencode($row["domain"]) . "&responsiblemail=" . urlencode($row["responsiblemail"]) . "&serialdate=" . $row["serialdate"] . "&serialnum=" . $row["serialnum"] . "&ttl=" . $row["ttl"] . "&retry=" . $row["retry"] . "&refresh=" . $row["refresh"] . "&expire=" . $row["expire"] . "&minimum=" . $row["minimum"] . "&slaveonly=" . $row["slaveonly"] . "&zonepath=" . urlencode($row["zonefilepath1"]) . "&seczonepath=" . urlencode($row["zonefilepath2"]), my_("Edit DNS Zone")));
 insert($c, block(" | "));
 insert($c, anchor($_SERVER["PHP_SELF"] . "?cust={$cust}&dataid=" . $row["data_id"] . "&action=export" . "&domain=" . urlencode($row["domain"]) . "&responsiblemail=" . urlencode($row["responsiblemail"]) . "&serialdate=" . $row["serialdate"] . "&serialnum=" . $row["serialnum"] . "&ttl=" . $row["ttl"] . "&retry=" . $row["retry"] . "&refresh=" . $row["refresh"] . "&expire=" . $row["expire"] . "&minimum=" . $row["minimum"] . "&slaveonly=" . $row["slaveonly"] . "&zonepath=" . urlencode($row["zonefilepath1"]) . "&seczonepath=" . urlencode($row["zonefilepath2"]), my_("Export DNS Zone"), $ipplanParanoid ? array("onclick" => "return confirm('" . my_("Are you sure to Export?") . "')") : FALSE));
 // have zone records been modified
 if ($row["error_message"] == "E") {
 }
 insert($c, block(" | "));
 insert($c, anchor("whois.php?lookup=" . urlencode($row["domain"]), my_("Whois")));
 insert($c, block("</small>"));
 if ($totcnt % MAXTABLESIZE == MAXTABLESIZE - 1) {
     break;
 }
开发者ID:hetznerZA,项目名称:ipplan,代码行数:31,代码来源:modifydns.php

示例5: row

function row() {
	echo '<tr>';
	foreach (func_get_args() as $arg) {
		cell($arg);
	}
	echo '</tr>';
}
开发者ID:rishair,项目名称:schlagelink-twilio,代码行数:7,代码来源:HTML.php

示例6: searchOverlap

function searchOverlap($ds, &$w, $cust1, $cust2)
{
    global $block;
    // dont trust variables
    $cust1 = floor($cust1);
    $cust2 = floor($cust2);
    $custdescrip1 = $ds->GetCustomerDescrip($cust1);
    $custdescrip2 = $ds->GetCustomerDescrip($cust2);
    // this query is not quick as indexes cannot be used!!!
    // must have first baseaddr called baseaddr else block pager
    // will not work - may break databases other than mysql
    $result =& $ds->ds->Execute("SELECT t1.baseaddr AS baseaddr,\n                           t1.baseindex AS baseindex1,\n                           t1.subnetsize AS subnetsize1,\n                           t1.descrip AS descrip1,\n                           t2.baseaddr AS baseaddr2,\n                           t2.baseindex AS baseindex2,\n                           t2.subnetsize AS subnetsize2,\n                           t2.descrip AS descrip2\n                        FROM base t1, base t2\n                        WHERE ((t1.baseaddr BETWEEN t2.baseaddr AND\n                                t2.baseaddr+t2.subnetsize-1) OR\n                               (t1.baseaddr+t1.subnetsize-1\n                                BETWEEN t2.baseaddr AND\n                                        t2.baseaddr+t2.subnetsize-1) OR\n                               (t1.baseaddr < t2.baseaddr AND\n                                t1.baseaddr+t1.subnetsize >\n                                t2.baseaddr+t2.subnetsize)) AND\n                               t1.customer={$cust1} AND\n                                t2.customer={$cust2}\n                        ORDER BY t1.baseaddr");
    $totcnt = 0;
    $vars = "";
    // fastforward till first record if not first block of data
    while ($block and $totcnt < $block * MAXTABLESIZE and $row = $result->FetchRow()) {
        $vars = DisplayBlock($w, $row, $totcnt, "&cust1[]=" . $cust1 . "&cust2[]=" . $cust2);
        $totcnt++;
    }
    insert($w, block("<p>"));
    $cnt = 0;
    while ($row = $result->FetchRow()) {
        // draw heading only if there are records to display
        if ($cnt == 0) {
            // create a table
            insert($w, $t = table(array("cols" => "8", "class" => "outputtable")));
            // draw heading
            setdefault("cell", array("class" => "heading"));
            insert($t, $c = cell(array("colspan" => "4")));
            insert($c, block("<center>"));
            insert($c, text($custdescrip1));
            insert($c, block("</center>"));
            insert($t, $c = cell(array("colspan" => "4")));
            insert($c, block("<center>"));
            insert($c, text($custdescrip2));
            insert($c, block("</center>"));
            insert($t, $c = cell());
            if (!empty($vars)) {
                insert($c, anchor($vars, "<<"));
            }
            insert($c, text(my_("Base address")));
            insert($t, $c = cell());
            insert($c, text(my_("Subnet size")));
            insert($t, $c = cell());
            insert($c, text(my_("Subnet mask")));
            insert($t, $c = cell());
            insert($c, text(my_("Description")));
            insert($t, $c = cell());
            insert($c, text(my_("Base address")));
            insert($t, $c = cell());
            insert($c, text(my_("Subnet size")));
            insert($t, $c = cell());
            insert($c, text(my_("Subnet mask")));
            insert($t, $ck = cell());
            insert($ck, text(my_("Description")));
            setdefault("cell", array("class" => color_flip_flop()));
        }
        // customer 1
        if ($row["subnetsize1"] == 1) {
            insert($t, $c = cell());
            insert($c, text(inet_ntoa($row["baseaddr"])));
        } else {
            insert($t, $c = cell());
            insert($c, anchor("displaysubnet.php?baseindex=" . $row["baseindex1"], inet_ntoa($row["baseaddr"])));
        }
        if ($row["subnetsize1"] == 1) {
            insert($t, $c = cell());
            insert($c, text("Host"));
        } else {
            insert($t, $c = cell());
            insert($c, text($row["subnetsize1"]));
        }
        insert($t, $c = cell());
        insert($c, text(inet_ntoa(inet_aton(ALLNETS) + 1 - $row["subnetsize1"]) . "/" . inet_bits($row["subnetsize1"])));
        insert($t, $c = cell());
        insert($c, text($row["descrip1"]));
        // customer 2
        if ($row["subnetsize2"] == 1) {
            insert($t, $c = cell());
            insert($c, text(inet_ntoa($row["baseaddr2"])));
        } else {
            insert($t, $c = cell());
            insert($c, anchor("displaysubnet.php?baseindex=" . $row["baseindex2"], inet_ntoa($row["baseaddr2"])));
        }
        if ($row["subnetsize2"] == 1) {
            insert($t, $c = cell());
            insert($c, text(my_("Host")));
        } else {
            insert($t, $c = cell());
            insert($c, text($row["subnetsize2"]));
        }
        insert($t, $c = cell());
        insert($c, text(inet_ntoa(inet_aton(ALLNETS) + 1 - $row["subnetsize2"]) . "/" . inet_bits($row["subnetsize2"])));
        insert($t, $c = cell());
        insert($c, text($row["descrip2"]));
        if ($totcnt % MAXTABLESIZE == MAXTABLESIZE - 1) {
            break;
        }
        $cnt++;
        $totcnt++;
//.........这里部分代码省略.........
开发者ID:hetznerZA,项目名称:ipplan,代码行数:101,代码来源:displayoverlap.php

示例7: isset

$grps = $auth->authenticate();
// set language
isset($_COOKIE["ipplanLanguage"]) && myLanguage($_COOKIE['ipplanLanguage']);
$title = my_("Display subnet information");
newhtml($p);
$myWwwPath = '../menus/';
$w = myheading($p, $title);
insert($w, generic("link", array("rel" => "stylesheet", "href" => "{$myWwwPath}" . "layerstreemenu.css")));
insert($w, generic("link", array("rel" => "stylesheet", "href" => "{$myWwwPath}" . "layerstreemenu-hidden.css")));
insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . 'libjs/layerstreemenu-cookies.js')));
// display opening text
insert($w, heading(3, my_("Display subnets.")));
insert($w, text(my_("Click on customer/AS to display all associated subnets, click on the area to display all subnets in area and contained ranges, click on a range to display only subnets associated with that range. Subnets not within an area or range can be viewed by selecting the customer/AS.")));
insert($w, block("<p><hr>"));
insert($w, $t = table(array("cols" => "1", "width" => "100%", "border" => "1", "cellspacing" => "2", "frame" => "void", "rules" => "ALL", "cellpadding" => "5")));
insert($t, $leftmenu = cell(array("align" => "left", "width" => "100%", "valign" => "top")));
//read the database and create the strings containing the menus
$ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database"));
@set_time_limit(90);
// default is collapsed, change to "1" for expanded tree
// value is stored in a cookie so clear cookies to see effect
$expanded = "";
$displayall = FALSE;
$menustring = "";
if ($custresult = $ds->GetCustomerGrp(0)) {
    $adminuser = $ds->TestGrpsAdmin($grps);
    //customer
    while ($custrow = $custresult->Fetchrow()) {
        // remove all from list if global searching is not available
        if (!$displayall and strtolower($custrow["custdescrip"]) == "all") {
            continue;
开发者ID:hetznerZA,项目名称:ipplan,代码行数:31,代码来源:treeview.php

示例8: help

 public static function help($params = array())
 {
     $cli = new BedrockYAML(self::$script_dir . "/code/lib/_cli.yml");
     $allowed_actions = $cli->getAllowedActions();
     say(cell("Command", 20, true, "grey", "on_white") . cell("Description", 50, true, "grey", "on_white") . cell("Options", 50, true, "grey", "on_white"));
     foreach ($allowed_actions as $a) {
         $options = array();
         foreach ($a->getOptions() as $o) {
             $options[] = "[" . $o->get('arg') . "] ";
             foreach ($o->get('description') as $line) {
                 $options[] = $line;
             }
             $options[] = "";
         }
         array_pop($options);
         $descriptions = $a->getDescription()->toArray();
         $source = sizeof($options) > sizeof($descriptions) ? $options : $descriptions;
         for ($i = 0; $i < sizeof($source); $i++) {
             $cmd = $i == 0 ? $a->getKey() : "";
             state(cell($cmd, 20, false));
             $desc = isset($descriptions[$i]) ? $descriptions[$i] : "";
             $opt = isset($options[$i]) ? $options[$i] : "";
             state(cell($desc, 50, false));
             state(cell($opt, 50, false));
             state("\n");
         }
         say(cell("", 20) . cell("", 50) . cell("", 50));
     }
 }
开发者ID:Tangdongle,项目名称:SilverSmith,代码行数:29,代码来源:SilverSmith.php

示例9: qs_process_agents

function qs_process_agents($agent = null)
{
    if (!$agent) {
        return;
    }
    echo '<table border cellspacing="0">';
    echo rawurlencode(cell($agent, 'caption') . "\n");
    echo qs_header(array('ip', 'month', 'access', 'page', 'country', 'agent', 'search', 'ns', 'name', 'val'));
    $date = rawurldecode($_POST['date']);
    $agents = qs_agent_search_i($agent, $date);
    qs_output_agents($agents, $date);
    $keys = array_keys($_POST);
    foreach ($keys as $key) {
        if (strpos($key, 'date_') !== false) {
            $date = rawurldecode($_POST[$key]);
            $agents = qs_agent_search_i($agent, $date);
            qs_output_agents($agents, $date);
        }
    }
    echo '</table>';
}
开发者ID:omusico,项目名称:isle-web-framework,代码行数:21,代码来源:extended_data.php

示例10: myheading

function myheading($q, $title, $displaymenu = true)
{
    // Generate the correct prefix for URLs in menu.
    $BASE_URL = base_url();
    $BASE_DIR = base_dir();
    $myDirPath = $BASE_DIR . '/menus/';
    $myWwwPath = $BASE_URL . '/menus/';
    // these files should probably not be here
    require_once $myDirPath . 'lib/PHPLIB.php';
    require_once $myDirPath . 'lib/layersmenu-common.inc.php';
    require_once $myDirPath . 'lib/layersmenu.inc.php';
    require_once $BASE_DIR . '/menudefs.php';
    eval("\$ADMIN_MENU = \"{$ADMIN_MENU}\";");
    // create the html page HEAD section
    insert($q, $header = wheader("IPPlan - {$title}"));
    insert($q, $w = container("div", array("class" => "matte")));
    insert($header, generic("meta", array("http-equiv" => "Content-Type", "content" => "text/html; charset=UTF-8")));
    if ($displaymenu) {
        insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$myWwwPath}" . "layersmenu-gtk2.css")));
        //    insert($header, generic("link",array("rel"=>"stylesheet","href"=>"$myWwwPath"."layersmenu-demo.css")));
    }
    // Konqueror and Safari browsers do not support overflow: auto css tag so use custom stylesheet
    if (stristr($_SERVER["HTTP_USER_AGENT"], "konqueror") or stristr($_SERVER["HTTP_USER_AGENT"], "safari")) {
        insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$BASE_URL}" . "/themes/default-safari.css")));
    } else {
        // Added theme support.
        $themecookie = isset($_COOKIE["ipplanTheme"]) ? $_COOKIE["ipplanTheme"] : "";
        global $config_themes;
        // obtained from config.php file which is global
        if (!empty($themecookie) and $config_themes[$themecookie] != "") {
            insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$BASE_URL}" . "/themes/{$config_themes[$themecookie]}")));
        } else {
            insert($header, generic("link", array("rel" => "stylesheet", "href" => "{$BASE_URL}" . "/themes/default.css")));
        }
    }
    if ($displaymenu) {
        insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . "libjs/layersmenu-browser_detection.js")));
        insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . 'libjs/layersmenu-library.js')));
        insert($w, script("", array("language" => "JavaScript", "type" => "text/javascript", "src" => $myWwwPath . 'libjs/layersmenu.js')));
        $mid = new LayersMenu(6, 7, 2, 1);
        $mid->setDirroot($BASE_DIR . '/menus/');
        $mid->setLibjsdir($BASE_DIR . '/menus/libjs/');
        $mid->setImgdir($BASE_DIR . '/menus/menuimages/');
        $mid->setImgwww($BASE_URL . '/menus/menuimages/');
        $mid->setIcondir($BASE_DIR . '/menus/menuicons/');
        $mid->setIconwww($BASE_URL . '/menus/menuicons/');
        $mid->setTpldir($BASE_DIR . '/menus/templates/');
        $mid->SetMenuStructureString($ADMIN_MENU);
        $mid->setIconsize(16, 16);
        $mid->parseStructureForMenu('hormenu1');
        $mid->newHorizontalMenu('hormenu1');
    }
    // draw header box
    insert($w, $con = container("div", array("class" => "headerbox", "align" => "center")));
    insert($con, heading(1, my_("IPPlan - IP Address Management and Tracking")));
    insert($con, block("<br>"));
    insert($con, heading(3, $title));
    if ($displaymenu) {
        // draw menu box here
        insert($w, $con = container("div", array("class" => "menubox")));
        insert($con, $t = table(array("cols" => "2", "width" => "100%")));
        insert($t, $c1 = cell());
        insert($t, $c2 = cell(array("align" => "right")));
        insert($c1, block($mid->getHeader()));
        insert($c1, block($mid->getMenu('hormenu1')));
        insert($c1, block($mid->getFooter()));
        // find a place to display logged in user
        insert($c2, $uc = container("div", array("class" => "userbox")));
        if (getAuthUsername() != "") {
            insert($uc, block(sprintf(my_("Logged in as %s"), getAuthUsername())));
        }
    }
    insert($w, $con = container("div", array("class" => "normalbox")));
    insert($w, $con1 = container("div", array("class" => "footerbox")));
    insert($con1, block("IPPlan v4.92b"));
    return $con;
}
开发者ID:hetznerZA,项目名称:ipplan,代码行数:77,代码来源:ipplanlib.php

示例11: insertEditGroupForm

function insertEditGroupForm($w, $ds)
{
    list($ipaddr, $size, $grp) = myRegister("S:ipaddr S:size S:grp");
    $result =& $ds->ds->Execute("SELECT * FROM grp WHERE grp=" . $ds->ds->qstr($grp));
    $row = $result->FetchRow();
    $grpdescrip = $row["grpdescrip"];
    $createcust = $row["createcust"];
    $grpopt = $row["grpopt"];
    $resaddr = $row["resaddr"];
    insert($w, $t = table(array("width" => "100%", "cols" => "2", "border" => "0", "cellspacing" => "0", "valign" => "middle")));
    insert($t, $c = cell());
    insert($c, block("<b>"));
    insert($c, text(my_("Editing Group:") . " {$grp}"));
    insert($c, block("</b><br>"));
    insert($c, block("<i>" . my_(" Description: ") . "</i>"));
    insert($c, text($grpdescrip));
    insert($w, generic("br"));
    insert($t, $c = cell(array("align" => "right")));
    insert($c, $f = form(array("method" => "post", "action" => $_SERVER["PHP_SELF"])));
    insert($f, hidden(array("name" => "action", "value" => "deletegroup")));
    insert($f, hidden(array("name" => "grp", "value" => "{$grp}")));
    insert($f, submit(array("value" => my_("Delete Group"))));
    // MODIFY GROUP FORM
    insert($w, $f1 = form(array("method" => "post", "action" => $_SERVER["PHP_SELF"])));
    insert($f1, $con = container("fieldset", array("class" => "fieldset")));
    insert($con, $legend = container("legend", array("class" => "legend")));
    insert($legend, text(my_("Modify group")));
    insert($con, hidden(array("name" => "grp", "value" => "{$grp}")));
    insert($con, hidden(array("name" => "action", "value" => "modifygroup")));
    insert($con, textbr(my_("Group description:")));
    insert($con, input_text(array("name" => "grpdescrip", "value" => "{$grpdescrip}", "size" => "80", "maxlength" => "80")));
    insert($con, textbrbr(my_("Group can create/modify/delete customers?")));
    insert($con, selectbox(array("N" => my_("No"), "Y" => my_("Yes")), array("name" => "createcust"), $createcust));
    insert($con, textbrbr(my_("Group can view any customers data?")));
    // first bit defines view capability
    insert($con, selectbox(array("N" => my_("No"), "Y" => my_("Yes")), array("name" => "grpview"), $grpopt & 1 ? "Y" : "N"));
    insert($con, textbrbr(my_("Number of reserved addresses at start of subnets:")));
    insert($con, span(my_("NOTE: if the user belongs to multiple groups and one of the groups does not contain a reserved limit, then the user is allowed all actions"), array("class" => "textSmall")));
    insert($con, input_text(array("name" => "resaddr", "value" => "{$resaddr}", "size" => "4", "maxlength" => "4")));
    insert($con, generic("br"));
    insert($con, generic("br"));
    insert($con, submit(array("value" => my_("Update"))));
    insert($con, generic("br"));
    // START Add User Form
    $result1 =& $ds->ds->Execute("SELECT userid\n            FROM users\n            ORDER BY userid");
    $c = 0;
    $lst = array();
    while ($row = $result1->FetchRow()) {
        $col = $row["userid"];
        $lst["{$col}"] = $row["userid"];
        $c++;
        // here
    }
    if ($c > 0) {
        insert($w, $con = container("fieldset", array("class" => "fieldset")));
        insert($con, $legend = container("legend", array("class" => "legend")));
        insert($legend, text(my_("User Membership")));
        insert($con, $f2 = form(array("name" => "ENTRY", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
        insert($f2, selectbox($lst, array("name" => "userid")));
        insert($f2, hidden(array("name" => "action", "value" => "addusertogroup")));
        insert($f2, hidden(array("name" => "refpage", "value" => "grp")));
        insert($f2, hidden(array("name" => "grp", "value" => "{$grp}")));
        insert($f2, submit(array("value" => my_("Add User"))));
        // Edit users assigned to the group.
        $result =& $ds->ds->Execute("SELECT * FROM usergrp WHERE grp=" . $ds->ds->qstr($grp));
        $lst = array();
        while ($row = $result->FetchRow()) {
            $col = $row["userid"];
            $lst["{$col}"] = $row["userid"];
        }
        if (!empty($lst)) {
            insert($con, $t = table(array("cols" => "2")));
            //insert($con,$t = table(array("cols"=>"2", "class"=>"outputtable")));
            //setdefault("cell",array("class"=>"heading"));
            insert($t, $c = cell());
            insert($c, text(my_("Current Members")));
            insert($t, $c = cell());
            $icecream = 0;
            foreach ($lst as $u) {
                //setdefault("cell",array("class"=>color_flip_flop()));
                $icecream++;
                insert($t, $c = cell());
                insert($c, block("{$u}"));
                insert($t, $c = cell());
                insert($c, $f = form(array("name" => "userkill{$icecream}", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
                insert($f, hidden(array("name" => "action", "value" => "deleteuserfromgroup")));
                insert($f, hidden(array("name" => "userid", "value" => "{$u}")));
                insert($f, hidden(array("name" => "grp", "value" => "{$grp}")));
                insert($f, hidden(array("name" => "refpage", "value" => "grp")));
                insert($c, block("<a href='#' onclick='userkill{$icecream}.submit();'>" . my_("Remove From Group") . "</a>"));
            }
        }
    }
    insert($w, generic("br"));
    // Ok.  How bout adding bounds to the group???
    insert($w, $con = container("fieldset", array("class" => "fieldset")));
    insert($con, $legend = container("legend", array("class" => "legend")));
    insert($con, textbr(my_("NOTE: if the user belongs to multiple groups and one of the groups does not contain authority boundaries, then the user is allowed all actions")));
    insert($legend, text(my_("Authority Boundaries")));
    insert($con, $f2 = form(array("name" => "ENTRY", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
//.........这里部分代码省略.........
开发者ID:hetznerZA,项目名称:ipplan,代码行数:101,代码来源:usermanager.php

示例12: WriteForumTableContents

function WriteForumTableContents()
{
    $cats = array();
    $rCats = Query("SELECT * FROM {categories} ORDER BY corder, id");
    $forums = array();
    if (NumRows($rCats)) {
        while ($cat = Fetch($rCats)) {
            $cats[$cat['id']] = $cat;
        }
        $rForums = Query("SELECT * FROM {forums} ORDER BY forder, id");
        $forums = array();
        if (NumRows($rForums)) {
            while ($forum = Fetch($rForums)) {
                $forums[$forum['id']] = $forum;
            }
        }
    }
    $hint = '';
    //$cats ? __("Hint: Click a forum or category to select it.") : '';
    $newforum = $cats ? '<button onclick="newForum();">' . __("Add Forum") . '</button>' : '';
    $buttons = '
	<tr class="cell2">
		<td>
			<span style="float: right;">' . $newforum . '<button onclick="newCategory();">' . __("Add Category") . '</button>
			</span>' . $hint . '
		</td>
	</tr>';
    print '
	<table class="outline margin" style="width: 45%;">
	<tr class="header1">
		<th>
			' . __("Edit forum list") . '
		</th>
	</tr>';
    print $buttons;
    foreach ($forums as $forum) {
        $cats[$forum['catid']]['forums'][$forum['id']] = $forum;
    }
    echo '<tr class="header0"><th>Main forums</th></tr>';
    foreach ($cats as $cid => $cat) {
        if ($cid < 0) {
            continue;
        }
        $cname = $cat['name'];
        print '
	<tbody id="cat' . $cat['id'] . '" class="c">
		<tr class="cell' . cell() . '">
			<td class="c" style="cursor: pointer;" onmousedown="pickCategory(' . $cat['id'] . ');">
				<strong>' . htmlspecialchars($cname) . '</strong>
			</td>
		</tr>';
        writeForums($cats, $cid, 1);
        print "</tbody>";
    }
    if ($forums) {
        print $buttons;
    }
    print '</table>';
}
开发者ID:knytrune,项目名称:ABXD,代码行数:59,代码来源:editfora.php

示例13: __

$title = __("Administration");
$key = hash('sha256', "{$loguserid},{$loguser['pss']},{$salt}");
$cell = 1;
function cell($content)
{
    global $cell;
    $cell = $cell == 1 ? 0 : 1;
    Write("\n\t\t<tr class=\"cell{0}\">\n\t\t\t<td>\n\t\t\t\t{1}\n\t\t\t</td>\n\t\t</tr>\n\t", $cell, $content);
}
Write("\n\t<table class=\"outline margin width50\" style=\"float: right;\">\n\t\t<tr class=\"header1\">\n\t\t\t<th colspan=\"2\">\n\t\t\t\t" . __("Information") . "\n\t\t\t</th>\n\t\t</tr>\n");
cell(Format("\n\t\t\t\n\t\t\t\t" . __("Last viewcount milestone") . "\n\t\t\t</td>\n\t\t\t<td style=\"width: 60%;\">\n\t\t\t\t{0}\n\t\t\t", $misc['milestone']));
$bucket = "adminright";
include "./lib/pluginloader.php";
write("\n\t</table>\n");
$cell = 1;
Write("\n\t<table class=\"outline margin width25\">\n\t\t<tr class=\"header1\">\n\t\t\t<th>\n\t\t\t\t" . __("Admin tools") . "\n\t\t\t</th>\n\t\t</tr>\n");
cell("<a href=\"recalc.php\">" . __("Recalculate statistics") . "</a>");
cell("<a href=\"lastknownbrowsers.php\">" . __("Last Known Browsers") . "</a> " . __("(not admin-only)"));
cell("<a href=\"editpora.php\">" . __("Edit Points of Required Attention") . "</a>");
cell("<a href=\"ipbans.php\">" . __("Manage IP bans") . "</a>");
cell("<a href=\"managemods.php\">" . __("Manage local moderator assignments") . "</a>");
cell("<a href=\"editfora.php?key=" . $key . "\">" . __("Edit forum list") . "</a>");
cell("<a href=\"editcats.php\">" . __("Edit category list") . "</a>");
cell("<a href=\"editsettings.php\">" . __("Edit settings") . "</a>");
cell("<a href=\"optimize.php\">" . __("Optimize tables") . "</a>");
cell("<a href=\"log.php\">" . __("View log") . "</a>");
//if($loguser['powerlevel'] == 4)
//	cell("<a href=\"sql.php\">".__("SQL Console")."</a>");
$bucket = "adminleft";
include "./lib/pluginloader.php";
write("\n\t</table>\n");
开发者ID:RoadrunnerWMC,项目名称:ABXD-legacy,代码行数:31,代码来源:admin.php

示例14: _

<table summary="<?php 
echo _('List of table cells with differing background colours representing examplary dictionary states');
?>
">
 <caption><?php 
include_once 'data.php';
echo _("Color Legend") . "</caption>\n";
function cell($status, $description)
{
    echo ' <tr><td bgcolor="' . status2color($status) . '">';
    echo "{$description}</td></tr>\n";
}
cell("stable", _("Dictionary Status was marked as 'stable'"));
cell("big enough to be useful", _("Dictionary Status was marked as 'big enough to be useful' (from 10000 entries on)"));
cell("too small", _("Dictionary Status was marked as 'too small' (less than 1000 entries)"));
cell("low quality", _("Dictionary Status was marked as 'low quality'"));
cell("unknown", _("Dictionary Status was not given or is 'unknown'"));
?>
</table>
<p><?php 
echo _("The numbers for the platform downloads represent the download\n  sizes in Megabytes.") . ' ' . _("A small 'u' instead of a download link means\n  that the respective dictionary is not supported on that platform.") . ' ' . _("This is currently always due to characters of the dictionary not being\n  encodable or displayable for/on the platform.");
?>
</p>

开发者ID:bendman,项目名称:fd-dictionaries,代码行数:23,代码来源:legend.php

示例15: do_summary

function do_summary(&$count, &$hours, &$room_hash, &$name_hash)
{
    global $enable_periods;
    // Make a sorted array of area/rooms, and of names, to use for column
    // and row indexes. Use the rooms and names hashes built by accumulate().
    // At PHP4 we could use array_keys().
    reset($room_hash);
    while (list($room_key) = each($room_hash)) {
        $rooms[] = $room_key;
    }
    ksort($rooms);
    reset($name_hash);
    while (list($name_key) = each($name_hash)) {
        $names[] = $name_key;
    }
    ksort($names);
    $n_rooms = sizeof($rooms);
    $n_names = sizeof($names);
    echo "<div id=\"div_summary\">\n";
    echo "<h1>" . (empty($enable_periods) ? get_vocab("summary_header") : get_vocab("summary_header_per")) . "</h1>\n";
    echo "<table>\n";
    echo "<thead>\n";
    echo "<tr><th>&nbsp;</th>\n";
    for ($c = 0; $c < $n_rooms; $c++) {
        echo "<th colspan=\"2\">{$rooms[$c]}</th>\n";
        $col_count_total[$c] = 0;
        $col_hours_total[$c] = 0.0;
    }
    echo "<th colspan=\"2\"><br>" . get_vocab("total") . "</th></tr>\n";
    $grand_count_total = 0;
    $grand_hours_total = 0;
    echo "</thead>\n";
    echo "<tbody>\n";
    for ($r = 0; $r < $n_names; $r++) {
        $row_count_total = 0;
        $row_hours_total = 0.0;
        $name = $names[$r];
        echo "<tr><td>{$name}</td>\n";
        for ($c = 0; $c < $n_rooms; $c++) {
            $room = $rooms[$c];
            if (isset($count[$room][$name])) {
                $count_val = $count[$room][$name];
                $hours_val = $hours[$room][$name];
                cell($count_val, $hours_val);
                $row_count_total += $count_val;
                $row_hours_total += $hours_val;
                $col_count_total[$c] += $count_val;
                $col_hours_total[$c] += $hours_val;
            } else {
                echo "<td class=\"count\">&nbsp;</td><td>&nbsp;</td>\n";
            }
        }
        cell($row_count_total, $row_hours_total);
        echo "</tr>\n";
        $grand_count_total += $row_count_total;
        $grand_hours_total += $row_hours_total;
    }
    echo "<tr><td>" . get_vocab("total") . "</td>\n";
    for ($c = 0; $c < $n_rooms; $c++) {
        cell($col_count_total[$c], $col_hours_total[$c]);
    }
    cell($grand_count_total, $grand_hours_total);
    echo "</tr></tbody></table>\n";
    echo "</div>\n";
}
开发者ID:verdurin,项目名称:mrbs-mcr,代码行数:65,代码来源:report.php


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