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


PHP lang_trans函数代码示例

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


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

 function render_html()
 {
     // heading
     print "<h3>VENDORS/SUPPLIERS LIST</h3><br><br>";
     // display options form
     $this->obj_table->render_options_form();
     // display data
     if (!count($this->obj_table->columns)) {
         format_msbbox("important", "<p>Please select some valid options to display.</p>");
     } elseif (!$this->obj_table->data_num_rows) {
         format_msgbox("info", "<p>You currently have no vendors in your database.</p>");
     } else {
         // calculate all the totals and prepare processed values
         $this->obj_table->render_table_prepare();
         // display header row
         print "<table class=\"table_content\" cellspacing=\"0\" width=\"100%\">";
         print "<tr>";
         foreach ($this->obj_table->columns as $column) {
             print "<td class=\"header\"><b>" . $this->obj_table->render_columns[$column] . "</b></td>";
         }
         //placeholder for links
         print "<td class=\"header\">&nbsp;</td>";
         print "</tr>";
         // display data
         for ($i = 0; $i < $this->obj_table->data_num_rows; $i++) {
             $vendor_id = $this->obj_table->data[$i]["id"];
             $contact_id = sql_get_singlevalue("SELECT id AS value FROM vendor_contacts WHERE vendor_id = '" . $vendor_id . "' AND role = 'accounts' LIMIT 1");
             print "<tr>";
             foreach ($this->obj_table->columns as $columns) {
                 print "<td valign=\"top\">";
                 //contact name
                 if ($columns == "name_contact") {
                     $value = sql_get_singlevalue("SELECT contact AS value FROM vendor_contacts WHERE id = '" . $contact_id . "' LIMIT 1");
                     if ($value) {
                         print $value;
                     }
                 } else {
                     if ($columns == "contact_phone") {
                         $value = sql_get_singlevalue("SELECT detail AS value FROM vendor_contact_records WHERE contact_id = '" . $contact_id . "' AND type = 'phone' LIMIT 1");
                         if ($value) {
                             print $value;
                         }
                     } else {
                         if ($columns == "contact_mobile") {
                             $value = sql_get_singlevalue("SELECT detail AS value FROM vendor_contact_records WHERE contact_id = '" . $contact_id . "' AND type= 'mobile' LIMIT 1");
                             if ($value) {
                                 print $value;
                             }
                         } else {
                             if ($columns == "contact_email") {
                                 $value = sql_get_singlevalue("SELECT detail AS value FROM vendor_contact_records WHERE contact_id = '" . $contact_id . "' AND type= 'email' LIMIT 1");
                                 if ($value) {
                                     print $value;
                                 }
                             } else {
                                 if ($columns == "contact_fax") {
                                     $value = sql_get_singlevalue("SELECT detail AS value FROM vendor_contact_records WHERE contact_id = '" . $contact_id . "' AND type= 'fax' LIMIT 1");
                                     if ($value) {
                                         print $value;
                                     }
                                 } else {
                                     if ($this->obj_table->data_render[$i][$columns]) {
                                         //								print $columns;
                                         print $this->obj_table->data_render[$i][$columns];
                                     } else {
                                         print "&nbsp;";
                                     }
                                 }
                             }
                         }
                     }
                 }
                 print "</td>";
             }
             //links
             print "<td align=\"right\" nowrap >";
             print "<a class=\"button_small\" href=\"index.php?page=vendors/view.php&id=" . $this->obj_table->data[$i]["id"] . "\">" . lang_trans("details") . "</a>";
             print "<a class=\"button_small\" href=\"index.php?page=vendors/invoices.php&id=" . $this->obj_table->data[$i]["id"] . "\">" . lang_trans("invoices") . "</a>";
             print "</td>";
             print "</tr>";
         }
         print "</table>";
         print "<br />";
         //			 display CSV & PDF download links
         print "<p align=\"right\"><a class=\"button_export\" href=\"index-export.php?mode=csv&page=vendors/vendors.php\">Export as CSV</a></p>";
         print "<p align=\"right\"><a class=\"button_export\" href=\"index-export.php?mode=pdf&page=vendors/vendors.php\">Export as PDF</a></p>";
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:88,代码来源:vendors.php

示例13: execute

 function execute()
 {
     /*
     	Define form structure
     */
     $this->obj_form = new form_input();
     $this->obj_form->formname = "domain_edit";
     $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_name";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "domain_description";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "domain_description";
     $structure["type"] = "textarea";
     $this->obj_form->add_input($structure);
     // domain groups
     $sql_name_server_group_obj = new sql_query();
     $sql_name_server_group_obj->string = "SELECT id, group_name, group_description FROM name_servers_groups ORDER BY group_name";
     $sql_name_server_group_obj->execute();
     if ($sql_name_server_group_obj->num_rows()) {
         // user note
         $structure = NULL;
         $structure["fieldname"] = "domain_message";
         $structure["type"] = "message";
         $structure["defaultvalue"] = "<p>" . lang_trans("help_domain_group_selection") . "</p>";
         $this->obj_form->add_input($structure);
         $this->domain_array[] = "domain_message";
         // fetch customer's current domain status
         if (!isset($_SESSION["error"]["message"])) {
             $sql_domain_groups_obj = new sql_query();
             $sql_domain_groups_obj->string = "SELECT id_group FROM dns_domains_groups WHERE id_domain='" . $this->obj_domain->id . "'";
             $sql_domain_groups_obj->execute();
             if ($sql_domain_groups_obj->num_rows()) {
                 $sql_domain_groups_obj->fetch_array();
             }
         }
         // run through all the domains
         $sql_name_server_group_obj->fetch_array();
         foreach ($sql_name_server_group_obj->data as $data_group) {
             // define domain checkbox
             $structure = NULL;
             $structure["fieldname"] = "name_server_group_" . $data_group["id"];
             $structure["type"] = "checkbox";
             $structure["options"]["label"] = $data_group["group_name"] . " -- " . $data_group["group_description"];
             $structure["options"]["no_fieldname"] = "enable";
             // check if this domain is currently checked
             if ($sql_domain_groups_obj->data_num_rows) {
                 foreach ($sql_domain_groups_obj->data as $data) {
                     if ($data["id_group"] == $data_group["id"]) {
                         $structure["defaultvalue"] = "on";
                     }
                 }
             }
             // add to form
             $this->obj_form->add_input($structure);
             $this->domain_array[] = "name_server_group_" . $data_group["id"];
         }
     }
     // SOA configuration
     $structure = NULL;
     $structure["fieldname"] = "soa_hostmaster";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "soa_serial";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "soa_refresh";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure = NULL;
     $structure["fieldname"] = "soa_retry";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure["fieldname"] = "soa_expire";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $this->obj_form->add_input($structure);
     $structure["fieldname"] = "soa_default_ttl";
     $structure["type"] = "input";
     $structure["options"]["req"] = "yes";
     $structure["defaultvalue"] = $GLOBALS["config"]["DEFAULT_TTL_SOA"];
     $this->obj_form->add_input($structure);
     // hidden section
     $structure = NULL;
//.........这里部分代码省略.........
开发者ID:claybbs,项目名称:namedmanager,代码行数:101,代码来源:view.php

示例14: render_html

 function render_html()
 {
     // Title + Summary
     print "<h3>DOMAIN NAME RECORDS</h3><br>";
     print "<p>Below is a list of all the records for your domain name, if you change any of them and click save, the changes will be applied and the name servers will reload shortly.</p>";
     /*
     	Basic domain details
     
     	We have to do this manually in order to be able to handle all the transaction rows
     */
     // start form/table structure
     print "<form method=\"" . $this->obj_form->method . "\" action=\"" . $this->obj_form->action . "\" class=\"form_standard\" name=\"domain_records\">";
     print "<table class=\"form_table\" width=\"100%\">";
     // general form fields
     print "<tr class=\"header\">";
     print "<td colspan=\"2\"><b>" . lang_trans("domain_details") . "</b></td>";
     print "</tr>";
     $this->obj_form->render_row("domain_name");
     print "</tr>";
     // spacer
     print "<tr><td colspan=\"2\"><br></td></tr>";
     /*
     	NS Records
     */
     print "<tr class=\"header\">";
     print "<td colspan=\"2\"><b>" . lang_trans("domain_records_ns") . "</b></td>";
     print "</tr>";
     print "<tr>";
     print "<td colspan=\"2\" width=\"100%\">";
     print "<p>" . lang_trans("domain_records_ns_help") . "</p>";
     print "<table width=\"100%\">";
     print "<tr class=\"table_highlight_info\">";
     print "<td width=\"10%\"><b>" . lang_trans("record_type") . "</b></td>";
     print "<td width=\"15%\"><b>" . lang_trans("record_ttl") . "</b></td>";
     print "<td width=\"35%\"><b>" . lang_trans("record_origin") . "</b></td>";
     print "<td width=\"35%\"><b>" . lang_trans("record_content") . "</b></td>";
     print "<td width=\"5%\">&nbsp;</td>";
     print "</tr>";
     print "</tr>";
     // display all the rows
     for ($i = 0; $i < $this->num_records_ns; $i++) {
         if (isset($_SESSION["error"]["record_ns_" . $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_ns_" . $i . "_type");
         $this->obj_form->render_field("record_ns_" . $i . "_id");
         print "</td>";
         print "<td width=\"15%\" valign=\"top\">";
         $this->obj_form->render_field("record_ns_" . $i . "_ttl");
         print "</td>";
         print "<td width=\"35%\" valign=\"top\">";
         $this->obj_form->render_field("record_ns_" . $i . "_name");
         print "</td>";
         print "<td width=\"35%\" valign=\"top\">";
         $this->obj_form->render_field("record_ns_" . $i . "_content");
         print "</td>";
         print "<td width=\"5%\" valign=\"top\">";
         if ($this->obj_form->structure["record_ns_" . $i . "_delete_undo"]["defaultvalue"] != "disabled") {
             $this->obj_form->render_field("record_ns_" . $i . "_delete_undo");
             print "<strong class=\"delete_undo\"><a href=\"\">delete</a></strong>";
         }
         print "</td>";
         print "</tr>";
     }
     print "</table>";
     print "</td></tr>";
     // spacer
     print "<tr><td colspan=\"2\"><br></td></tr>";
     /*
     	MX Records
     */
     print "<tr class=\"header\">";
     print "<td colspan=\"2\"><b>" . lang_trans("domain_records_mx") . "</b></td>";
     print "</tr>";
     print "<tr>";
     print "<td colspan=\"2\" width=\"100%\">";
     print "<table width=\"100%\">";
     print "<p>" . lang_trans("domain_records_mx_help") . "</p>";
     print "<tr class=\"table_highlight_info\">";
     print "<td width=\"10%\"><b>" . lang_trans("record_type") . "</b></td>";
     print "<td width=\"15%\"><b>" . lang_trans("record_ttl") . "</b></td>";
     print "<td width=\"10%\"><b>" . lang_trans("record_prio") . "</b></td>";
     print "<td width=\"25%\"><b>" . lang_trans("record_origin") . "</b></td>";
     print "<td width=\"35%\"><b>" . lang_trans("record_content") . "</b></td>";
     print "<td width=\"5%\">&nbsp;</td>";
     print "</tr>";
     // display all the rows
     for ($i = 0; $i < $this->num_records_mx; $i++) {
         if (isset($_SESSION["error"]["record_mx_" . $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_mx_" . $i . "_type");
         $this->obj_form->render_field("record_mx_" . $i . "_id");
         print "</td>";
//.........这里部分代码省略.........
开发者ID:claybbs,项目名称:namedmanager,代码行数:101,代码来源:records.php

示例15: render_html

 function render_html()
 {
     // Title + Summary
     print "<h3>TEMPLATE SELECTION</h3><br>";
     print "<p>You can adjust the PDFs generated by the Amberdms Billing System by using different templates - these templates may include different languages, different layouts or other styling effects.</p>";
     format_msgbox("info", "<p>If you have made your own template you would like to contribute back or if you need customisation work, please contact <a href=\"mailto:support@amberdms.com\">support@amberdms.com</a> for details and we will be happy to assist.</p>");
     foreach ($this->obj_sql_invoice_data as $invoice_type_name => $invoice_type_data) {
         foreach ($invoice_type_data['templates'] as $data_sql) {
             if ($data_sql["active"]) {
                 $current_template_url = $data_sql["template_file"] . "_icon.png";
                 $current_template_name = $data_sql["template_name"];
                 $current_template_description = $data_sql["template_description"];
                 break;
             }
         }
         print "<form action=" . $this->obj_form->action . " method=" . $this->obj_form->method . ">";
         print "<br /><br /><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" class=\"template_table\">";
         print "<tr class=\"current_template_row\">";
         print "<td class=\"current_template_cell\" colspan=\"2\">";
         print "<div class=\"current_template_header\"><p><h3>" . $invoice_type_data['name'] . ":</h3></p></div>";
         print "<p><img class=\"current_template_image\" src=\"" . $current_template_url . "\" /></p>";
         print "<p class=\"current_template_description\"><b>" . $current_template_name . "</b><br />";
         print $current_template_description . "</p><br />";
         print "<p><strong><a class=\"change_template\" id=\"change_template\" href=\"\">Change...</a></strong></p>";
         print "</td>";
         print "<td class=\"filler_cell\">";
         print "</td>";
         print "<td class=\"filler_cell\">";
         print "</td>";
         print "</tr>";
         $j = -1;
         $array = array();
         for ($i = 0; $i < count($invoice_type_data['templates']); $i++) {
             if ($i % 3 == 0) {
                 $j++;
             }
             $array[$j][] = $i;
         }
         for ($j = 0; $j < count($array); $j++) {
             //images
             print "<tr class=\"available_templates_row ar_invoices_templates\">";
             for ($i = 0; $i < 3; $i++) {
                 if (isset($array[$j][$i])) {
                     $id = $array[$j][$i];
                     print "<td class=\"available_templates_cell\">";
                     print "<img  src=\"" . $invoice_type_data['templates'][$id]["template_file"] . "_icon.png\">";
                     print "</td>";
                 } else {
                     print "<td class=\"filler_cell\">";
                     print "</td>";
                 }
             }
             print "</tr>";
             //details
             print "<tr class=\"available_templates_row ar_invoices_templates\">";
             for ($i = 0; $i < 3; $i++) {
                 if (isset($array[$j][$i])) {
                     $id = $array[$j][$i];
                     print "<td class=\"available_templates_cell\" valign=\"top\">";
                     print "<p><strong>" . $invoice_type_data['templates'][$id]["template_name"] . "</strong></p>";
                     print "<p>" . $invoice_type_data['templates'][$id]["template_description"] . "</p>";
                     print "</td>";
                 } else {
                     print "<td class=\"filler_cell\">";
                     print "</td>";
                 }
             }
             print "</tr>";
             //select
             print "<tr class=\"available_templates_row " . $invoice_type_name . "_templates\">";
             for ($i = 0; $i < 3; $i++) {
                 if (isset($array[$j][$i])) {
                     $id = $array[$j][$i];
                     print "<td class=\"available_templates_cell\">";
                     print "<p><input type=\"radio\" name=\"selected_template\" id=\"" . $invoice_type_data['templates'][$id]["id"] . "\" value=\"" . $invoice_type_data['templates'][$id]["id"] . "\" ";
                     if ($invoice_type_data['templates'][$id]["active"]) {
                         print "checked ";
                     }
                     print "><label for=\"" . $invoice_type_data['templates'][$id]["id"] . "\"> " . lang_trans("use_this_template") . "</label></p>";
                     print "</td>";
                 } else {
                     print "<td class=\"filler_cell\">";
                     print "</td>";
                 }
             }
             print "</tr>";
         }
         print "<tr class=\"available_templates_row ar_invoices_templates\">";
         print "<td class=\"available_templates_cell\" colspan=\"3\">";
         print "<input type=\"hidden\" name=\"action\" value=\"pdf_template\">&nbsp;&nbsp;";
         print "<input type=\"hidden\" name=\"template_type\" value=\"" . $invoice_type_name . "\">&nbsp;&nbsp;";
         print "<input type=\"submit\" value=\"Save Changes\">&nbsp;&nbsp;";
         print "<input type=\"button\" value=\"Cancel\" class=\"cancelbutton\">";
         print "<br />&nbsp;";
         print "</td>";
         print "</tr>";
         print "</table>";
         print "</form>";
     }
     // Loop through the email template forms, displaying them.
//.........这里部分代码省略.........
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:101,代码来源:templates.php


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