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


PHP site::show_modules方法代碼示例

本文整理匯總了PHP中site::show_modules方法的典型用法代碼示例。如果您正苦於以下問題:PHP site::show_modules方法的具體用法?PHP site::show_modules怎麽用?PHP site::show_modules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在site的用法示例。


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

示例1: form_content

 function form_content()
 {
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
         //print_r($arg_list);
     }
     $sql = "select content_id, content_module, content_column, content_level, content_display, content_active " . "from content where content_id = '" . $get_vars["content_id"] . "'";
     if ($result = mysql_query($sql)) {
         if (mysql_num_rows($result)) {
             $content = mysql_fetch_array($result);
         }
     }
     print "<table width='300'>";
     print "<form action = '" . $_SERVER["SELF"] . "?page=" . $get_vars["page"] . "&method=" . $get_vars["method"] . "' name='form_module' method='post'>";
     print "<tr valign='top'><td>";
     print "<span class='admin'><b>CONTENT MODULE</b></span><br/><br/>";
     print "</td></tr>";
     print "<tr valign='top'><td>";
     print "<b>NOTE:</b> You are adding a content module to the site (Have you loaded it already in the <b>MODULES-&gt;Module Database</b>?). Do not forget to set module permissions in <b>MODULES-&gt;Grant Permissions</b> to enable site users to see menu items for this module.<br/><br/>";
     print "</td></tr>";
     print "<tr valign='top'><td>";
     print "<span class='boxtitle'>CONTENT MODULE</span><br> ";
     print site::show_modules($content["content_module"] ? $content["content_module"] : $post_vars["module"]);
     print "<br/><br/></td></tr>";
     print "<tr valign='top'><td>";
     print "<span class='boxtitle'>DISPLAY CONTENT ON THIS COLUMN</span><br> ";
     print "<select name='mod_column' class='textbox'>";
     print "<option value=''>Select Display Column</option>";
     print "<option value='1' " . ($content["content_column"] == "1" ? "selected" : "") . ">Column 1</option>";
     print "<option value='2' " . ($content["content_column"] == "2" ? "selected" : "") . ">Column 2</option>";
     print "</select>";
     print "<br/></td></tr>";
     print "<tr><td>";
     print "<tr valign='top'><td>";
     print "<span class='boxtitle'>PLACE THE CONTENT AT LEVEL</span><br> ";
     print "<select name='mod_level' class='textbox'>";
     print "<option value=''>Select Display Level</option>";
     print "<option value='1' " . ($content["content_level"] == "1" ? "selected" : "") . ">Level 1</option>";
     print "<option value='2' " . ($content["content_level"] == "2" ? "selected" : "") . ">Level 2</option>";
     print "<option value='3' " . ($content["content_level"] == "3" ? "selected" : "") . ">Level 3</option>";
     print "<option value='4' " . ($content["content_level"] == "4" ? "selected" : "") . ">Level 4</option>";
     print "<option value='5' " . ($content["content_level"] == "5" ? "selected" : "") . ">Level 5</option>";
     print "</select>";
     print "<br/></td></tr>";
     print "<tr><td><br/>";
     if ($get_vars["content_id"]) {
         print "<input type='hidden' name='content_id' value='" . $get_vars["content_id"] . "'/>";
         print "<input type='submit' value = 'Update Module' class='textbox' name='submitmodule' style='border: 1px solid #000000'> ";
         print "<input type='submit' value = 'Delete Module' class='textbox' name='submitmodule' style='border: 1px solid #000000'> ";
     } else {
         print "<input type='submit' value = 'Add Module' class='textbox' name='submitmodule' style='border: 1px solid #000000'> ";
     }
     print "</td></tr>";
     print "</form>";
     print "</table><br>";
 }
開發者ID:BackupTheBerlios,項目名稱:aefitools-svn,代碼行數:61,代碼來源:class.site.php


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