• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP lang_trans函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: render_html

 function render_html()
 {
     // Title + Summary
     print "<h3>DEPENDENCIES CHECK</h3><br>";
     print "<p>This page checks each of the billing system's dependencies. If a red 'x' appears in the status column, the system cannot find that module.</p>";
     print "<table class=\"table_content\" cellspacing=\"0\" width=\"100%\">";
     print "<tr>";
     print "<td class=\"header\">";
     print "<b>" . lang_trans("dependency_status") . "</b>";
     print "</td>";
     print "<td class=\"header\">";
     print "<b>" . lang_trans("dependency_name") . "</b>";
     print "</td>";
     print "<td class=\"header\">";
     print "<b>" . lang_trans("dependency_location") . "</b>";
     print "</td>";
     print "</tr>";
     //parse through the array to generate table rows
     foreach ($this->table_array as $name => $data) {
         print "<tr>";
         print "<td>";
         if ($data["status"]) {
             print "<img alt=\"Y\" src=\"images/icons/tick_16.gif\">";
         } else {
             print "<img alt=\"N\" src=\"images/icons/cross_16.gif\">";
         }
         print "</td>";
         print "<td>";
         print "<b>" . $name . "</b>";
         print "</td>";
         print "<td>";
         print $data["location"];
         print "</td>";
         print "</tr>";
     }
     print "</table>";
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:37,代码来源:config_dependencies.php


示例2: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "config_application";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "admin/config_application-process.php";
     $this->obj_form->method = "post";
     // default codes
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_AP_INVOICENUM";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_AR_INVOICENUM";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_GL_TRANSNUM";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_QUOTES_NUM";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_CREDIT_NUM";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CODE_ACCOUNT";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CODE_CUSTOMER";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CODE_PRODUCT";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CODE_PROJECT";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CODE_VENDOR";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CODE_STAFF";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     // invoicing options
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_SERVICES_ADVANCEBILLING";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["options"]["width"] = "50";
     $structure["options"]["label"] = " days";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_SERVICES_DATESHIFT";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["options"]["width"] = "50";
     $structure["options"]["label"] = " " . lang_trans("help_accounts_services_dateshift");
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_TERMS_DAYS";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_AUTOPAY";
     $structure["type"] = "checkbox";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["options"]["label"] = " Check to have invoices automatically paid where there is credit or reoccuring billing details.";
     $this->obj_form->add_input($structure);
     // email options
     $structure = NULL;
     $structure["fieldname"] = "ACCOUNTS_EMAIL_ADDRESS";
     $structure["type"] = "input";
     $structure["options"]["label"] = " Internal email address to send billing system related emails to.";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:101,代码来源:config_application.php


示例3: get_dropdown

function get_dropdown($p_control_array, $p_control_name, $p_match = '', $p_add_any = false, $p_multiple = false)
{
    $t_control_array = $p_control_array;
    if ($p_multiple) {
        $t_size = ' size="5"';
        $t_multiple = ' multiple="multiple"';
    } else {
        $t_size = '';
        $t_multiple = '';
    }
    $t_info = sprintf("<select %s name=\"%s\" id=\"%s\"%s>", $t_multiple, $p_control_name, $p_control_name, $t_size);
    if ($p_add_any) {
        array_unshift_assoc($t_control_array, META_FILTER_ANY, lang_trans('[any]'));
    }
    while (list($t_name, $t_desc) = each($t_control_array)) {
        $t_sel = '';
        if (is_array($p_match)) {
            if (in_array($t_name, array_values($p_match)) || in_array($t_desc, array_values($p_match))) {
                $t_sel = ' selected="selected"';
            }
        } else {
            if ($t_name === $p_match || $t_desc === $p_match) {
                $t_sel = ' selected="selected"';
            }
        }
        $t_info .= sprintf("<option%s value=\"%s\">%s</option>", $t_sel, $t_name, $t_desc);
    }
    $t_info .= "</select>\n";
    return $t_info;
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:30,代码来源:print_api.php


示例4: generate_pdf


//.........这里部分代码省略.........
     $structure_group_summary = array();
     foreach ($sql_items_obj->data as $itemdata) {
         $structure = array();
         $structure["quantity"] = $itemdata["quantity"];
         switch ($itemdata["type"]) {
             case "product":
                 /*
                 	Fetch product code
                 */
                 $sql_obj = new sql_query();
                 $sql_obj->string = "SELECT code_product FROM products WHERE id='" . $itemdata["customid"] . "' LIMIT 1";
                 $sql_obj->execute();
                 $sql_obj->fetch_array();
                 $structure["info"] = $sql_obj->data[0]["code_product"];
                 unset($sql_obj);
                 /*
                 	Fetch discount (if any)
                 */
                 $itemdata["discount"] = sql_get_singlevalue("SELECT option_value as value FROM account_items_options WHERE itemid='" . $itemdata["id"] . "' AND option_name='DISCOUNT'");
                 /*
                 	Calculate Amount
                 
                 	(Amount field already has discount removed, but we can't use this for export, since we want the line item to be the full
                 	 amount, with an additional line item for the discount)
                 */
                 $itemdata["amount"] = $itemdata["price"] * $itemdata["quantity"];
                 $sql_obj = new sql_query();
                 $sql_obj->string = "SELECT product_groups.group_name " . " FROM products " . " LEFT JOIN product_groups " . " ON product_groups.id = products.id_product_group " . " WHERE products.id = '" . $itemdata["customid"] . "' " . " LIMIT 1";
                 $sql_obj->execute();
                 $sql_obj->fetch_array();
                 if ($sql_obj->data[0]["group_name"] != null) {
                     $structure["group"] = $sql_obj->data[0]["group_name"];
                 } else {
                     $structure["group"] = lang_trans("group_products");
                 }
                 break;
             case "time":
                 /*
                 	Fetch time group ID
                 */
                 $groupid = sql_get_singlevalue("SELECT option_value as value FROM account_items_options WHERE itemid='" . $itemdata["id"] . "' AND option_name='TIMEGROUPID'");
                 $structure["info"] = sql_get_singlevalue("SELECT CONCAT_WS(' -- ', projects.code_project, time_groups.name_group) as value FROM time_groups LEFT JOIN projects ON projects.id = time_groups.projectid WHERE time_groups.id='{$groupid}' LIMIT 1");
                 /*
                 	Fetch discount (if any)
                 */
                 $itemdata["discount"] = sql_get_singlevalue("SELECT option_value as value FROM account_items_options WHERE itemid='" . $itemdata["id"] . "' AND option_name='DISCOUNT'");
                 /*
                 	Calculate Amount
                 
                 	(Amount field already has discount removed, but we can't use this for export, since we want the line item to be the full
                 	 amount, with an additional line item for the discount)
                 */
                 $itemdata["amount"] = $itemdata["price"] * $itemdata["quantity"];
                 $structure["group"] = lang_trans("group_time");
                 break;
             case "service":
             case "service_usage":
                 /*
                 	Fetch Service Name
                 */
                 $sql_obj = new sql_query();
                 $sql_obj->string = "SELECT name_service FROM services WHERE id='" . $itemdata["customid"] . "' LIMIT 1";
                 $sql_obj->execute();
                 $sql_obj->fetch_array();
                 $structure["info"] = $sql_obj->data[0]["name_service"];
                 unset($sql_obj);
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:67,代码来源:inc_invoices.php


示例5: render_html

 function render_html()
 {
     /*
     	All other records
     */
     print "<tr class=\"table_highlight_info\">";
     print "<td width=\"10%\"><b>" . lang_trans("record_type") . "</b></td>";
     if (strpos($this->obj_domain->data["domain_name"], "arpa")) {
         print "<td width=\"15%\"><b>" . lang_trans("record_ttl") . "</b></td>";
     } else {
         print "<td width=\"10%\"><b>" . lang_trans("record_ttl") . "</b></td>";
     }
     print "<td width=\"35%\"><b>" . lang_trans("record_name") . "</b></td>";
     print "<td width=\"35%\"><b>" . lang_trans("record_content") . "</b></td>";
     if (!strpos($this->obj_domain->data["domain_name"], "arpa")) {
         print "<td width=\"5%\"><b>" . lang_trans("reverse_ptr") . "</b></td>";
     }
     print "<td width=\"5%\">&nbsp;</td>";
     print "</tr>";
     // display all the rows
     for ($i = 0; $i < $this->num_records_custom; $i++) {
         if (isset($_SESSION["error"]["record_custom_" . $i . "-error"])) {
             print "<tr class=\"form_error\">";
         } else {
             print "<tr class=\"table_highlight\">";
         }
         print "<td width=\"10%\" valign=\"top\">";
         $this->obj_form->render_field("record_custom_" . $i . "_type");
         $this->obj_form->render_field("record_custom_" . $i . "_id");
         print "</td>";
         if (strpos($this->obj_domain->data["domain_name"], "arpa")) {
             print "<td width=\"15%\" valign=\"top\">";
         } else {
             print "<td width=\"15%\" valign=\"top\">";
         }
         $this->obj_form->render_field("record_custom_" . $i . "_ttl");
         print "</td>";
         print "<td width=\"35%\" valign=\"top\">";
         $this->obj_form->render_field("record_custom_" . $i . "_name");
         print "</td>";
         print "<td width=\"35%\" valign=\"top\">";
         $this->obj_form->render_field("record_custom_" . $i . "_content");
         print "</td>";
         if (!strpos($this->obj_domain->data["domain_name"], "arpa")) {
             print "<td width=\"5%\" valign=\"top\" align=\"center\">";
             $this->obj_form->render_field("record_custom_" . $i . "_reverse_ptr");
             $this->obj_form->render_field("record_custom_" . $i . "_reverse_ptr_orig");
             print "</td>";
         }
         print "<td width=\"5%\" valign=\"top\" align=\"center\">";
         $this->obj_form->render_field("record_custom_" . $i . "_delete_undo");
         print "<strong class=\"delete_undo\"><a href=\"\">delete</a></strong>";
         print "</td>";
         print "</tr>";
     }
     // spacer
     print "<tr><td colspan=\"100%\"><p>" . $this->get_pagination_row() . "<span style=\"float:right;\" id=\"domain_records_custom_loading\" style=\"display:hidden;\"><img src=\"images/wait20.gif\" /></span></p></td></tr>";
     // hidden fields
     $this->obj_form->render_field("record_custom_id_domain");
     //$this->obj_form->render_field("num_records_ns");
     //$this->obj_form->render_field("num_records_mx");
     $this->obj_form->render_field("num_records_custom");
     $this->obj_form->render_field("record_custom_page");
     $this->obj_form->render_field("record_custom_status");
     // end table + form
     ///print "</table>";
     ///print "</form>";
 }
开发者ID:claybbs,项目名称:namedmanager,代码行数:68,代码来源:records-ajax.php


示例6: execute


//.........这里部分代码省略.........
             /*
             	data_traffic: Service Plan Options
             */
             $structure = NULL;
             $structure["fieldname"] = "plan_information";
             $structure["type"] = "message";
             $structure["defaultvalue"] = "<i>This section is where you define what units you wish to bill in, along with the cost of excess units. It is acceptable to leave the price for extra units set to 0.00 if you have some other method of handling excess usage (eg: rate shaping rather than billing). If you wish to create an uncapped/unlimited usage service, set both the price for extra units and the included units to 0.</i>";
             $this->obj_form->add_input($structure);
             $structure = form_helper_prepare_radiofromdb("units", "SELECT id, name as label, description as label1 FROM service_units WHERE typeid='" . $sql_plan_obj->data[0]["typeid"] . "' AND active='1' ORDER BY name");
             $structure["options"]["req"] = "yes";
             $structure["options"]["autoselect"] = "yes";
             $this->obj_form->add_input($structure);
             // handle misconfiguration
             if (empty($this->obj_form->structure["units"]["values"])) {
                 $this->obj_form->structure["units"]["type"] = "text";
                 $this->obj_form->structure["units"]["defaultvalue"] = "error_no_units_available";
             }
             // subforms
             $this->obj_form->subforms["service_plan_custom"] = array("plan_information", "units");
             /*
             	data_traffic: Service Plan Datacaps
             */
             // help info
             $structure = NULL;
             $structure["fieldname"] = "traffic_cap_help";
             $structure["type"] = "message";
             $structure["defaultvalue"] = "<p>Define the traffic cap(s) for the selected service below - note that the \"Any\" type will always exist and applies to any traffic that doesn't match any of the other types matched to the customer on this service.</p>";
             $this->obj_form->add_input($structure);
             $this->obj_form->subforms["traffic_caps"][] = "traffic_cap_help";
             // header
             $structure = NULL;
             $structure["fieldname"] = "traffic_cap_header_active";
             $structure["type"] = "text";
             $structure["defaultvalue"] = lang_trans("header_traffic_cap_active");
             $this->obj_form->add_input($structure);
             $structure = NULL;
             $structure["fieldname"] = "traffic_cap_header_name";
             $structure["type"] = "text";
             $structure["defaultvalue"] = lang_trans("header_traffic_cap_name");
             $this->obj_form->add_input($structure);
             $structure = NULL;
             $structure["fieldname"] = "traffic_cap_header_mode";
             $structure["type"] = "text";
             $structure["defaultvalue"] = lang_trans("header_traffic_cap_mode");
             $this->obj_form->add_input($structure);
             $structure = NULL;
             $structure["fieldname"] = "traffic_cap_header_units_included";
             $structure["type"] = "text";
             $structure["defaultvalue"] = lang_trans("header_traffic_units_included");
             $this->obj_form->add_input($structure);
             $structure = NULL;
             $structure["fieldname"] = "traffic_cap_header_units_price";
             $structure["type"] = "text";
             $structure["defaultvalue"] = lang_trans("header_traffic_units_price");
             $this->obj_form->add_input($structure);
             $this->obj_form->subforms_grouped["traffic_caps"]["traffic_cap_header"][] = "traffic_cap_header_active";
             $this->obj_form->subforms_grouped["traffic_caps"]["traffic_cap_header"][] = "traffic_cap_header_name";
             $this->obj_form->subforms_grouped["traffic_caps"]["traffic_cap_header"][] = "traffic_cap_header_mode";
             $this->obj_form->subforms_grouped["traffic_caps"]["traffic_cap_header"][] = "traffic_cap_header_units_included";
             $this->obj_form->subforms_grouped["traffic_caps"]["traffic_cap_header"][] = "traffic_cap_header_units_price";
             $this->obj_form->subforms["traffic_caps"][] = "traffic_cap_header";
             // loop through all the traffic types
             $obj_sql_traffic_types = new sql_query();
             $obj_sql_traffic_types->string = "SELECT id, type_name FROM traffic_types ORDER BY id='1', type_name DESC";
             $obj_sql_traffic_types->execute();
             $obj_sql_traffic_types->num_rows();
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:67,代码来源:inc_services_forms.php


示例7: render_menu_breadcrumbs

 function render_menu_breadcrumbs()
 {
     log_write("debug", "menu_main", "Executing render_breadcrumbs()");
     // only display if the user is not viewing the top of the site
     if (count($this->menu_order) == 1) {
         return 0;
     }
     /*
     	We now run through the menu order and also fetch the title
     	for the current page, and add all the page titles to an array.
     
     	By doing this, we eliminate any duplicated page titles and can
     	do a breadcrumb trail with no dupes.
     */
     $breadcrumbs = array();
     // menu steps
     for ($i = 1; $i <= count($this->menu_order); $i++) {
         foreach ($this->menu_structure as $data) {
             if ($data["topic"] == $this->menu_order[$i]) {
                 if ($data["topic"]) {
                     if (!in_array($data["topic"], $breadcrumbs)) {
                         // add the page to the breadcrumbs
                         $breadcrumbs[] = $data["topic"];
                     }
                 }
             }
         }
     }
     // current page
     foreach ($this->menu_structure as $data) {
         if ($data["link"] == $this->page) {
             if ($data["topic"]) {
                 if (!in_array($data["topic"], $breadcrumbs)) {
                     // add the page to the breadcrumbs
                     $breadcrumbs[] = $data["topic"];
                 }
             }
         }
     }
     /*
     	Output the provided bread crumbs
     */
     print "<p style=\"margin: 0px; padding: 4px;\"><b>";
     print "<a href=\"index.php\">Amberdms</a> &gt; ";
     for ($i = 0; $i < count($breadcrumbs); $i++) {
         foreach ($this->menu_structure as $data) {
             if ($data["topic"] == $breadcrumbs[$i]) {
                 print "<a href=\"index.php?page=" . $data["link"] . "\" title=" . lang_trans($data["topic"]) . ">" . lang_trans($data["topic"]) . "</a>";
                 if ($i < count($breadcrumbs) - 1) {
                     print " &gt; ";
                 }
             }
         }
     }
     print "</b></p>";
     return 1;
 }
开发者ID:claybbs,项目名称:namedmanager,代码行数:57,代码来源:inc_menus.php


示例8: security_script_input

function security_script_input($expression, $value, $mode = 0)
{
    // if the input matches the regex, all is good, otherwise set to "error".
    if (preg_match($expression, $value)) {
        $value = addslashes($value);
        return $value;
    } else {
        // failure to validate
        if ($mode) {
            $valuename = vname($valuename);
            $_SESSION["error"]["message"][] = "Invalid " . lang_trans($valuename) . " supplied, please correct.";
            $_SESSION["error"][$valuename] = 0;
            return $value;
        } else {
            return "error";
        }
    }
}
开发者ID:claybbs,项目名称:namedmanager,代码行数:18,代码来源:inc_security.php


示例9: render_html

 function render_html()
 {
     // display header
     print "<h3>CUSTOMER ATTRIBUTES</h3><br>";
     print "<p>Use this page to define attributes such as install dates, model numbers, serial numbers or other values of interest in an easy to search form. For more detailed text or file uploads, use the journal instead.</p>";
     if ($this->no_attributes == "true") {
         format_msgbox("info", "<p>You do not have any attributes currently assigned to this customer, use the fields below to begin entering some.</p>");
         print "<br>";
     }
     //add new group field/ button
     if (user_permissions_get("customers_write")) {
         print "<p id=\"show_add_group\"><strong><a href=\"\" class=\"button_small\">Create New Group...</a></strong></p>";
         print "<p class=\"add_group\"><strong>Create New Group:</strong></p>";
         print "<p class=\"add_group\">Name: <input type=\"text\" name=\"add_group\" /> &nbsp; <a href=\"\" class=\"button_small\" id=\"add_group\">Add</a> &nbsp; <a href=\"\" class=\"button_small\" id=\"close_add_group\">Cancel</a></p>";
     }
     // start form/table structure
     print "<form method=\"" . $this->obj_form->method . "\" action=\"" . $this->obj_form->action . "\" class=\"form_standard\">";
     print "<table id=\"attributes_table\" class=\"form_table\" width=\"100%\">";
     // display all the rows
     foreach ($this->group_arrays as $group_id => $attributes) {
         //header
         if (count($this->group_arrays) == 1) {
             print "<tr class=\"header hide_attributes\" id=\"group_row_" . $group_id . "\">";
         } else {
             print "<tr class=\"header show_attributes\" id=\"group_row_" . $group_id . "\">";
         }
         print "<td colspan=\"3\">";
         print "<div class=\"group_name\" id=\"group_name_" . $group_id . "\"><b>" . $attributes["name"] . "</b>";
         print "</div>";
         if (user_permissions_get("customers_write")) {
             print "<div class=\"group_links\">&nbsp;";
             print "<a href\"\" id=\"delete_group_" . $group_id . "\" class=\"delete_group button_small\">delete</a>";
             print "&nbsp;&nbsp;";
             print "<a href=\"\" class=\"show_change_group_name button_small\" id=\"show_change_group_name_" . $group_id . "\">change name</a>";
             print "&nbsp;</div>";
         }
         print "<div class=\"change_group_name\" id=\"change_group_name_" . $group_id . "\"><input type=\"text\" value=\"" . $attributes["name"] . "\" name=\"change_group_name_" . $group_id . "\" /> &nbsp; <a href=\"\" class=\"button_small change_group_name_button\" id=\"change_group_name_button_" . $group_id . "\">Change</a> &nbsp; <a href=\"\" class=\"button_small close_change_group_name\" id=\"close_change_group_name_" . $group_id . "\">Cancel</a></div>";
         $this->obj_form->render_field("group_" . $group_id . "_new_attributes");
         print "<input type=\"hidden\" name=\"group_delete_status_" . $group_id . "\" value=\"false\" />";
         print "</td>";
         if (count($this->group_arrays) == 1) {
             print "<td class=\"expand_collapse\"><b>^</b></td>";
         } else {
             print "<td class=\"expand_collapse\"><b>v</b></td>";
         }
         print "</tr>";
         //subheader
         if (count($this->group_arrays) == 1) {
             print "<tr class=\"header group_row_" . $group_id . "\">";
         } else {
             print "<tr class=\"header hidden_attribute_row group_row_" . $group_id . "\">";
         }
         print "<td><b>" . lang_trans("attribute_key") . "</b></td>";
         print "<td><b>" . lang_trans("attribute_value") . "</b></td>";
         print "<td><br/></td>";
         print "<td><br/></td>";
         print "</tr>";
         if (count($this->group_arrays) == 1) {
             print "<tr class=\"group_row_" . $group_id . "\">";
         } else {
             print "<tr class=\"hidden_attribute_row group_row_" . $group_id . "\">";
         }
         print "<td colspan=\"4\"></td>";
         print "</tr>";
         //display each attribute in the group
         foreach ($attributes as $key => $id) {
             if ((string) $key != "name") {
                 if (isset($_SESSION["error"]["attribute_" . $id . "_value-error"]) || isset($_SESSION["error"]["attribute_" . $id . "_key-error"])) {
                     print "<tr class=\"table_highlight form_error group_row_" . $group_id . "\" >";
                 } else {
                     if (count($this->group_arrays) == 1) {
                         print "<tr class=\"table_highlight group_row_" . $group_id . "\">";
                     } else {
                         print "<tr class=\"hidden_attribute_row table_highlight group_row_" . $group_id . "\">";
                     }
                 }
                 print "<td width=\"30%\" valign=\"top\">";
                 $this->obj_form->render_field("attribute_" . $id . "_key");
                 $this->obj_form->render_field("attribute_" . $id . "_id");
                 print "</td>";
                 print "<td width=\"50%\" valign=\"top\">";
                 $this->obj_form->render_field("attribute_" . $id . "_value");
                 print "</td>";
                 print "<td width=\"15%\" valign=\"top\">";
                 $this->obj_form->render_field("attribute_" . $id . "_group");
                 if (user_permissions_get("customers_write")) {
                     print "<strong><a href=\"\" ";
                     if (count($this->group_arrays) == 1) {
                         print "class=\"hidden_move\" ";
                     }
                     print "id=\"move_row_" . $id . "\">move...</a></strong>";
                 }
                 print "</td>";
                 print "<td width=\"5%\" valign=\"top\">";
                 if (user_permissions_get("customers_write")) {
                     if ($this->obj_form->structure["attribute_" . $id . "_delete_undo"]["defaultvalue"] != "disabled") {
                         $this->obj_form->render_field("attribute_" . $id . "_delete_undo");
                         print "<strong class=\"delete_undo\"><a href=\"\">delete</a></strong>";
                     }
                 }
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:101,代码来源:attributes.php


示例10: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "domain_add";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "domains/edit-process.php";
     $this->obj_form->method = "post";
     // general
     $structure = NULL;
     $structure["fieldname"] = "domain_type";
     $structure["type"] = "radio";
     $structure["values"] = array("domain_standard", "domain_reverse_ipv4", "domain_reverse_ipv6");
     $structure["options"]["req"] = "yes";
     $structure["defaultvalue"] = "domain_standard";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "domain_name";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv4_help";
     $structure["type"] = "text";
     $structure["options"]["req"] = "yes";
     $structure["defaultvalue"] = "help_ipv4_help";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv6_help";
     $structure["type"] = "text";
     $structure["options"]["req"] = "yes";
     $structure["defaultvalue"] = "help_ipv6_help";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv4_network";
     $structure["type"] = "input";
     $structure["options"]["help"] = "eg: 192.168.0.0/24";
     $structure["options"]["label"] = " include /cidr for ranges greater than /24";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv4_autofill";
     $structure["type"] = "checkbox";
     $structure["options"]["label"] = lang_trans("help_ipv4_autofill");
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv4_autofill_forward";
     $structure["type"] = "checkbox";
     $structure["options"]["label"] = lang_trans("help_ipv4_autofill_forward");
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv4_autofill_reverse_from_forward";
     $structure["type"] = "checkbox";
     $structure["options"]["label"] = lang_trans("help_ipv4_autofill_reverse_from_forward");
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv4_autofill_domain";
     $structure["type"] = "input";
     $structure["options"]["help"] = "eg: static.example.com";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "ipv6_network";
     $structure["type"] = "input";
     $structure["options"]["help"] = "eg: 2001:db8::/48";
     $structure["options"]["label"] = " always include a /cidr value (/1 though to /64)";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     /*
     		$structure = NULL;
     		$structure["fieldname"] 	= "ipv6_autofill";
     		$structure["type"]		= "checkbox";
     		$structure["options"]["label"]	= lang_trans("help_ipv6_autofill");
     		$structure["options"]["req"]	= "yes";
     		$this->obj_form->add_input($structure);
     
     		$structure = NULL;
     		$structure["fieldname"] 	= "ipv6_autofill_forward";
     		$structure["type"]		= "checkbox";
     		$structure["options"]["label"]	= lang_trans("help_ipv6_autofill_forward");
     		$structure["options"]["req"]	= "yes";
     		$this->obj_form->add_input($structure);
     */
     $structure = NULL;
     $structure["fieldname"] = "ipv6_autofill_reverse_from_forward";
     $structure["type"] = "checkbox";
     $structure["options"]["label"] = lang_trans("help_ipv6_autofill_reverse_from_forward");
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     /*
     		$structure = NULL;
     		$structure["fieldname"] 	= "ipv6_autofill_domain";
     		$structure["type"]		= "input";
     		$structure["options"]["help"]	= "eg: static.example.com";
     		$structure["options"]["req"]	= "yes";
//.........这里部分代码省略.........
开发者ID:claybbs,项目名称:namedmanager,代码行数:101,代码来源:add.php


示例11: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "config_locale";
     $this->obj_form->language = $_SESSION["user"]["lang"];
     $this->obj_form->action = "admin/config_locale-process.php";
     $this->obj_form->method = "post";
     // language options
     $structure = form_helper_prepare_radiofromdb("LANGUAGE_DEFAULT", "SELECT name as id, name as label FROM language_avaliable ORDER BY name");
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     // appearance options
     $structure = form_helper_prepare_dropdownfromdb("THEME_DEFAULT", "SELECT id, theme_name as label FROM themes ORDER BY theme_name");
     $structure["options"]["autoselect"] = "yes";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "TABLE_LIMIT";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["options"]["label"] = " " . lang_trans("help_table_limit");
     $this->obj_form->add_input($structure);
     // time options
     $structure = form_helper_prepare_timezonedropdown("TIMEZONE_DEFAULT");
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["options"]["search_filter"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "DATEFORMAT";
     $structure["type"] = "radio";
     $structure["values"] = array("yyyy-mm-dd", "mm-dd-yyyy", "dd-Mmm-yyyy", "dd-mm-yyyy");
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     // currency options
     $structure = NULL;
     $structure["fieldname"] = "CURRENCY_DEFAULT_NAME";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CURRENCY_DEFAULT_SYMBOL";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CURRENCY_DEFAULT_SYMBOL_POSITION";
     $structure["type"] = "radio";
     $structure["values"] = array("before", "after");
     $structure["options"]["no_translate_fieldname"] = "yes";
     $structure["translations"]["before"] = "Before the currency value (eg: \$20)";
     $structure["translations"]["after"] = "After the currency value (eg: 20 RSD)";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CURRENCY_DEFAULT_THOUSANDS_SEPARATOR";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "CURRENCY_DEFAULT_DECIMAL_SEPARATOR";
     $structure["type"] = "input";
     $structure["options"]["no_translate_fieldname"] = "yes";
     $this->obj_form->add_input($structure);
     // submit section
     $structure = NULL;
     $structure["fieldname"] = "submit";
     $structure["type"] = "submit";
     $structure["defaultvalue"] = "Save Changes";
     $this->obj_form->add_input($structure);
     // define subforms
     $this->obj_form->subforms["config_language"] = array("LANGUAGE_DEFAULT");
     $this->obj_form->subforms["config_appearance"] = array("THEME_DEFAULT", "TABLE_LIMIT");
     $this->obj_form->subforms["config_date"] = array("DATEFORMAT", "TIMEZONE_DEFAULT");
     $this->obj_form->subforms["config_currency"] = array("CURRENCY_DEFAULT_NAME", "CURRENCY_DEFAULT_SYMBOL", "CURRENCY_DEFAULT_SYMBOL_POSITION", "CURRENCY_DEFAULT_THOUSANDS_SEPARATOR", "CURRENCY_DEFAULT_DECIMAL_SEPARATOR");
     $this->obj_form->subforms["submit"] = array("submit");
     if (error_check()) {
         // load error datas
         $this->obj_form->load_data_error();
     } else {
         // fetch all the values from the database
         $sql_config_obj = new sql_query();
         $sql_config_obj->string = "SELECT name, value FROM config ORDER BY name";
         $sql_config_obj->execute();
         $sql_config_obj->fetch_array();
         foreach ($sql_config_obj->data as $data_config) {
             $this->obj_form->structure[$data_config["name"]]["defaultvalue"] = $data_config["value"];
         }
         unset($sql_config_obj);
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:92,代码来源:config_locale.php


示例12: render_html

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP langdate函数代码示例发布时间:2022-05-15
下一篇:
PHP lang_select函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap