本文整理汇总了PHP中helpLink函数的典型用法代码示例。如果您正苦于以下问题:PHP helpLink函数的具体用法?PHP helpLink怎么用?PHP helpLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了helpLink函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drawAdminTools_SSH
function drawAdminTools_SSH($domain, $adm_path)
{
global $adm_login;
global $adm_pass;
global $edit_domain;
global $edssh_account;
global $addrlink;
global $conf_hide_password;
global $conf_domain_based_ssh_logins;
global $pro_mysql_ssh_table;
$txt = "";
// Build the popup values and display values arrays
$path_popup_vals = array();
$path_popup_disp = array();
$path_popup_vals[] = "{$adm_path}";
$path_popup_disp[] = "/ [ uses www ]";
$path_popup_vals[] = "{$adm_path}/{$edit_domain}";
$path_popup_disp[] = "/{$edit_domain} [ uses www ]";
$nbr_subdomains = sizeof($domain["subdomains"]);
for ($i = 0; $i < $nbr_subdomains; $i++) {
$sub_name = $domain["subdomains"][$i]["name"];
$path_popup_vals[] = "{$adm_path}/{$edit_domain}/subdomains/{$sub_name}";
$path_popup_disp[] = "/{$edit_domain}/subdomains/{$sub_name}";
}
$dsc = array("title" => _("List of your SSH accounts:"), "new_item_title" => _("New SSH account:"), "new_item_link" => _("new SSH account"), "edit_item_title" => _("SSH account configuration:"), "table_name" => $pro_mysql_ssh_table, "action" => "ssh_access_editor", "forward" => array("adm_login", "adm_pass", "addrlink"), "id_fld" => "id", "list_fld_show" => "login", "max_item" => $domain["max_ssh"], "num_item_txt" => _("Number of active ssh accounts:"), "create_item_callback" => "sshAccountsCallback", "where_list" => array("hostname" => $domain["name"]), "check_unique" => array("login"), "check_unique_msg" => _("There is already a ssh login by that name"), "check_unique_use_where_list" => "no", "order_by" => "login", "cols" => array("id" => array("type" => "id", "display" => "no", "legend" => "id"), "login" => array("type" => "text", "check" => "dtc_login_or_email", "legend" => _("Login:")), "password" => array("type" => "password", "check" => "dtc_pass", "cryptfield" => "crypt", "legend" => _("Password:")), "homedir" => array("type" => "popup", "values" => $path_popup_vals, "display_replace" => $path_popup_disp, "legend" => _("Path:"))));
if ($conf_domain_based_ssh_logins == "yes") {
$dsc["cols"]["login"]["happen_domain"] = "@" . $domain["name"];
}
$txt .= dtcListItemsEdit($dsc);
$txt .= helpLink("PmWiki/Ssh-Accounts");
return $txt;
}
示例2: productManager
function productManager()
{
global $pro_mysql_product_table;
global $secpayconf_currency_symbol;
if (!isset($secpayconf_currency_symbol)) {
get_secpay_conf();
}
$dsc = array("table_name" => $pro_mysql_product_table, "title" => _("Product list editor") . _(" (shared)"), "action" => "hosting_product_list_shared", "forward" => array("rub"), "where_condition" => "heb_type='shared'", "cols" => array("id" => array("type" => "id", "display" => "yes", "legend" => "Id"), "name" => array("type" => "text", "legend" => _("Product name"), "size" => "30"), "period" => array("type" => "text", "help" => _("Period for the product with format YYYY-MM-DD. For example, if you want a product that will last 1 year, 2 months, and 3 days, write 0001-02-03. "), "legend" => _("Period"), "size" => "10"), "price_dollar" => array("type" => "text", "legend" => _("Price"), "size" => "4"), "setup_fee" => array("type" => "text", "legend" => _("Setup fee"), "size" => "4"), "affiliate_kickback" => array("type" => "text", "help" => _("This is the amount of money that you will give back to the affiliate account that made the sell possible."), "legend" => _("Commission") . " " . $secpayconf_currency_symbol, "size" => "4"), "quota_disk" => array("type" => "text", "help" => _("Hard drive space in MBytes."), "legend" => _("Disk"), "size" => "4"), "nbr_email" => array("type" => "text", "legend" => _("Max email"), "size" => "2"), "nbr_database" => array("type" => "text", "legend" => _("Max database"), "size" => "2"), "bandwidth" => array("type" => "text", "legend" => _("Traffic"), "size" => "5"), "allow_add_domain" => array("type" => "popup", "legend" => _("Add domain"), "help" => _("If set to yes, the the admin can add a domain, if set to check, then it will go through moderation, set to no, no domain addition to account is possible by the admin."), "values" => array("check", "no", "yes"), "display_replace" => array(_("check"), _("no"), _("yes"))), "max_domain" => array("type" => "text", "legend" => _("Max domain"), "help" => _("Maximum number of domain a customer can add by himself on his shared account. Setting a value of zero will mean no limit."), "size" => "3"), "allow_dns_and_mx_change" => array("type" => "checkbox", "legend" => _("DNS & MX"), "help" => _("If set to no, users wont be able to edit the DNS and MX pointer of their domains."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no"), "ftp_login_flag" => array("type" => "checkbox", "legend" => _("FTP"), "help" => _("If set to no, users wont be able to add/remove/edit FTP accounts."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "yes"), "restricted_ftp_path" => array("type" => "checkbox", "legend" => _("Restricted FTP"), "help" => _("If set to no, users will only be able to create FTP accounts with a path in the html folder of each vhosts."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no"), "allow_mailing_list_edit" => array("type" => "checkbox", "legend" => _("Lists"), "help" => _("If set to no, users wont be able to add/remove/edit mailing lists and mail alias groups."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "yes"), "allow_subdomain_edit" => array("type" => "checkbox", "legend" => _("Subdomains"), "help" => _("If set to no, users wont be able to add/remove/edit subdomains."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "yes"), "pkg_install_flag" => array("type" => "checkbox", "legend" => _("Subdomains"), "help" => _("If set to no, users wont be able to use the package installer."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "yes"), "private" => array("type" => "checkbox", "legend" => _("Private"), "help" => _("If the private flag is set, then this product wont appear in the registration form."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no")));
$out = dtcDatagrid($dsc);
// Build the product ID popup
$qp = "SELECT id,name FROM {$pro_mysql_product_table} WHERE renew_prod_id='0' AND heb_type='vps'";
$rp = mysql_query($qp) or die("Cannot query \"{$qp}\" !!! line: " . __LINE__ . " file: " . __FILE__ . " sql said: " . mysql_error());
$np = mysql_num_rows($rp);
$renew_id_popup = array();
$renew_id_popup[] = 0;
$renew_id_replace = array();
$renew_id_replace[] = _("Not a renewal product");
for ($j = 0; $j < $np; $j++) {
$ap = mysql_fetch_array($rp);
$renew_id_popup[] = $ap["id"];
if (strlen($ap["name"]) > 20) {
$renew_id_replace[] = $ap["id"] . ": " . substr($ap["name"], 0, 17) . "...";
} else {
$renew_id_replace[] = $ap["id"] . ": " . $ap["name"];
}
}
$dsc = array("table_name" => $pro_mysql_product_table, "title" => _("Product list editor") . _(" (VPS)"), "action" => "hosting_product_list_vps", "forward" => array("rub"), "where_condition" => "heb_type='vps'", "cols" => array("id" => array("type" => "id", "display" => "yes", "legend" => "Id"), "renew_prod_id" => array("type" => "popup", "help" => _("If you set the renewal ID, then this entry will be considered as a renewal product for the matching ID."), "legend" => _("Renewal-ID"), "values" => $renew_id_popup, "display_replace" => $renew_id_replace), "name" => array("type" => "text", "legend" => _("Name"), "size" => "30"), "period" => array("type" => "text", "help" => _("Period for the product with format YYYY-MM-DD. For example, if you want a product that will last 1 year, 2 months, and 3 days, write 0001-02-03. "), "legend" => _("Period"), "size" => "10"), "price_dollar" => array("type" => "text", "legend" => _("Price"), "size" => "4"), "setup_fee" => array("type" => "text", "legend" => _("Setup fee"), "size" => "4"), "affiliate_kickback" => array("type" => "text", "help" => _("This is the amount of money that you will give back to the affiliate account that made the sell possible."), "legend" => _("Commission") . " " . $secpayconf_currency_symbol, "size" => "4"), "quota_disk" => array("type" => "text", "help" => _("Hard drive space in MBytes."), "legend" => _("Disk"), "size" => "4"), "memory_size" => array("type" => "text", "help" => _("Memory size in MBytes."), "legend" => _("RAM"), "size" => "4"), "bandwidth" => array("type" => "text", "help" => _("Bandwidth per month in MBytes."), "legend" => _("Traffic"), "size" => "5"), "private" => array("type" => "checkbox", "legend" => _("Private"), "help" => _("If the private flag is set, then this product wont appear in the registration form."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no")));
$out .= dtcDatagrid($dsc);
// Build the product ID popup
$qp = "SELECT id,name FROM {$pro_mysql_product_table} WHERE renew_prod_id='0' AND heb_type='server'";
$rp = mysql_query($qp) or die("Cannot query \"{$qp}\" !!! line: " . __LINE__ . " file: " . __FILE__ . " sql said: " . mysql_error());
$np = mysql_num_rows($rp);
$renew_id_popup = array();
$renew_id_popup[] = 0;
$renew_id_replace = array();
$renew_id_replace[] = _("Not a renewal product");
for ($j = 0; $j < $np; $j++) {
$ap = mysql_fetch_array($rp);
$renew_id_popup[] = $ap["id"];
if (strlen($ap["name"]) > 20) {
$renew_id_replace[] = $ap["id"] . ": " . substr($ap["name"], 0, 17) . "...";
} else {
$renew_id_replace[] = $ap["id"] . ": " . $ap["name"];
}
}
$dsc = array("table_name" => $pro_mysql_product_table, "title" => _("Product list editor") . _(" (Dedicated servers)"), "action" => "hosting_product_list_dedicated", "forward" => array("rub"), "where_condition" => "heb_type='server'", "cols" => array("id" => array("type" => "id", "display" => "yes", "legend" => "Id"), "renew_prod_id" => array("type" => "popup", "help" => _("If you set the renewal ID, then this entry will be considered as a renewal product for the matching ID."), "legend" => _("Renewal-ID"), "values" => $renew_id_popup, "display_replace" => $renew_id_replace), "name" => array("type" => "text", "legend" => _("Name"), "size" => "30"), "period" => array("type" => "text", "help" => _("Period for the product with format YYYY-MM-DD. For example, if you want a product that will last 1 year, 2 months, and 3 days, write 0001-02-03. "), "legend" => _("Period"), "size" => "10"), "price_dollar" => array("type" => "text", "legend" => _("Price"), "size" => "4"), "setup_fee" => array("type" => "text", "legend" => _("Setup fee"), "size" => "4"), "affiliate_kickback" => array("type" => "text", "help" => _("This is the amount of money that you will give back to the affiliate account that made the sell possible."), "legend" => _("Commission") . " " . $secpayconf_currency_symbol, "size" => "4"), "quota_disk" => array("type" => "text", "help" => _("Hard drive space in MBytes."), "legend" => _("Disk"), "size" => "4"), "memory_size" => array("type" => "text", "help" => _("Memory size in MBytes."), "legend" => "RAM", "size" => "4"), "bandwidth" => array("type" => "text", "help" => _("Bandwidth per month in GBytes."), "legend" => _("Traffic"), "size" => "5"), "use_radius" => array("type" => "checkbox", "legend" => _("Use Radius"), "help" => _("If the Use Radius flag is set this service is used to check a radius user."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no"), "private" => array("type" => "checkbox", "legend" => _("Private"), "help" => _("If the private flag is set, then this product wont appear in the registration form."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no")));
$out .= dtcDatagrid($dsc);
$dsc = array("table_name" => $pro_mysql_product_table, "title" => _("Product list editor") . _(" (SSL IPs)"), "action" => "hosting_product_list_ssl", "forward" => array("rub"), "where_condition" => "heb_type='ssl'", "cols" => array("id" => array("type" => "id", "display" => "yes", "legend" => "Id"), "renew_prod_id" => array("type" => "popup", "legend" => _("Renewal-ID"), "help" => _("There must be ONLY ONE SSL product at any time, with only ONE renewal product."), "values" => $renew_id_popup, "display_replace" => array(_("No-renew"))), "name" => array("type" => "text", "legend" => _("Name"), "size" => "30"), "period" => array("type" => "text", "help" => _("Period for the product with format YYYY-MM-DD. For example, if you want a product that will last 1 year, 2 months, and 3 days, write 0001-02-03. "), "legend" => _("Period"), "size" => "10"), "price_dollar" => array("type" => "text", "legend" => _("Price"), "size" => "4"), "setup_fee" => array("type" => "text", "legend" => _("Setup fee"), "size" => "4"), "affiliate_kickback" => array("type" => "text", "help" => _("This is the amount of money that you will give back to the affiliate account that made the sell possible."), "legend" => _("Commission") . " " . $secpayconf_currency_symbol, "size" => "4"), "private" => array("type" => "checkbox", "legend" => _("Private"), "help" => _("If the private flag is set, then this product wont appear in the registration form."), "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "default" => "no")));
$out .= dtcDatagrid($dsc);
$out .= helpLink("PmWiki/HostingProductManager");
return $out;
}
示例3: drawAdminTools_Aliases
function drawAdminTools_Aliases($domain)
{
global $adm_login;
global $adm_pass;
global $edit_domain;
global $edit_mailbox;
global $addrlink;
global $pro_mysql_pop_table;
global $pro_mysql_mailaliasgroup_table;
checkLoginPassAndDomain($adm_login, $adm_pass, $domain["name"]);
$out = "";
$dsc = array("title" => _("List of your mail groups"), "new_item_title" => _("Create New Mail Group"), "new_item_link" => _("Create Mail Group"), "edit_item_title" => _("Edit Mail Group"), "table_name" => $pro_mysql_mailaliasgroup_table, "action" => "aliasgroup", "forward" => array("adm_login", "adm_pass", "addrlink"), "id_fld" => "autoinc", "list_fld_show" => "id", "max_item" => $domain["max_email"], "num_item_txt" => _("Number of active mailboxes:"), "create_item_callback" => "emailAliasesCreateCallback", "delete_item_callback" => "emailAliasesDeleteCallback", "edit_item_callback" => "emailAliasesEditCallback", "order_by" => "id", "where_list" => array("domain_parent" => $domain["name"]), "cols" => array("autoinc" => array("type" => "id", "display" => "no", "legend" => _("Login:")), "id" => array("type" => "text", "check" => "dtc_login_or_email", "disable_edit" => "yes", "happen" => "@" . $domain["name"], "legend" => _("Email:")), "delivery_group" => array("type" => "textarea", "check" => "mail_alias_group", "legend" => _("Delivery Group:"), "cols" => "40", "rows" => "7")), "check_unique" => array("id"), "check_unique_msg" => _("Email address is already in use!"));
$list_items = dtcListItemsEdit($dsc);
// We have to query again, in case something has changed
$q = "SELECT id FROM {$pro_mysql_mailaliasgroup_table} WHERE domain_parent='" . $domain["name"] . "';";
$r = mysql_query($q) or die("Cannot query {$q} line: " . __LINE__ . " file " . __FILE__ . " sql said:" . mysql_error());
$n = mysql_num_rows($r);
$out .= $list_items;
$out .= helpLink("PmWiki/Email-Accounts");
return $out;
}
示例4: helpLink
**
** ACH is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Open Source ACH. If not, see <http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////////////// */
if (in_array($active_user->id, $active_project->users)) {
?>
<h3>Enter Hypotheses <?php
helpLink('howto_hypotheses.php');
?>
</h3>
<p class="evidenceSubmenu"><b>Single</b> <a href="<?php
echo $base_URL;
?>
project/<?php
echo $active_project->id;
?>
/hypothesis/new/multiple">Multiple</a></p>
<p>Quick tips:
<ul><li>All of your hypotheses should be mutually exclusive: if one is correct, all others must be false.</li>
示例5: htmlencode
for ($i = 0; $i < sizeof($result); $i++) {
if (substr($result[$i]['name'], 0, 7) != "sqlite_" && $result[$i]['name'] != "") {
echo "<option value='" . htmlencode($result[$i]['name']) . "' selected='selected'>" . htmlencode($result[$i]['name']) . "</option>";
}
}
echo "</select>";
echo "<br/><br/>";
echo "<label><input type='radio' name='export_type' checked='checked' value='sql' onclick='toggleExports(\"sql\");'/> " . $lang['sql'] . "</label>";
echo "<br/><label><input type='radio' name='export_type' value='csv' onclick='toggleExports(\"csv\");'/> " . $lang['csv'] . "</label>";
echo "</fieldset>";
echo "<fieldset style='float:left; max-width:350px;' id='exportoptions_sql'><legend><b>" . $lang['options'] . "</b></legend>";
echo "<label><input type='checkbox' checked='checked' name='structure'/> " . $lang['export_struct'] . "</label> " . helpLink($lang['help5']) . "<br/>";
echo "<label><input type='checkbox' checked='checked' name='data'/> " . $lang['export_data'] . "</label> " . helpLink($lang['help6']) . "<br/>";
echo "<label><input type='checkbox' name='drop'/> " . $lang['add_drop'] . "</label> " . helpLink($lang['help7']) . "<br/>";
echo "<label><input type='checkbox' checked='checked' name='transaction'/> " . $lang['add_transact'] . "</label> " . helpLink($lang['help8']) . "<br/>";
echo "<label><input type='checkbox' checked='checked' name='comments'/> " . $lang['comments'] . "</label> " . helpLink($lang['help9']) . "<br/>";
echo "</fieldset>";
echo "<fieldset style='float:left; max-width:350px; display:none;' id='exportoptions_csv'><legend><b>" . $lang['options'] . "</b></legend>";
echo "<div style='float:left;'>" . $lang['fld_terminated'] . "</div>";
echo "<input type='text' value=';' name='export_csv_fieldsterminated' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>" . $lang['fld_enclosed'] . "</div>";
echo "<input type='text' value='\"' name='export_csv_fieldsenclosed' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>" . $lang['fld_escaped'] . "</div>";
echo "<input type='text' value='\\' name='export_csv_fieldsescaped' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>" . $lang['rep_null'] . "</div>";
echo "<input type='text' value='NULL' name='export_csv_replacenull' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<label><input type='checkbox' name='export_csv_crlf'/> " . $lang['rem_crlf'] . "</label><br/>";
示例6: helpLink
<option value="none">---</option>
<option value="credible">Credible</option>
<option value="suspect">Suspect</option>
</select></p>
<h4>Date/Time <?php
helpLink('howto_evidence.php#datetime');
?>
</h4>
<p><i>Format: YYYY-MM-DD HH:MM:SS. You may enter a date only, but not time only.</i></p>
<p><input type="text" name="date_of_source" value="" size="20" /></p>
<h4>Code <?php
helpLink('howto_evidence.php#code');
?>
</h4>
<p><input type="text" name="code" value="" size="20" /></p>
<h4>Flagged</h4>
<p><select name="flag">
<option value="n">No</option>
<option value="y">Yes</option>
</select></p>
<p class="submit"><input class="button" type="submit" value="Save" /></p>
</form>
示例7: if
<div class="sortTools" id="sortTools_show_data_columns" style="display: none;">
<p><b>Show Data Columns:</b>
<input type="checkbox" id="dateAdded" onclick="dccDateAdded = 1; if(document.getElementById('dateAdded').checked == true) { setStyleByClass('td','dclDateAdded','display',''); setStyleByClass('td','dcDateAdded','display',''); } else { setStyleByClass('td','dclDateAdded','display','none'); setStyleByClass('td','dcDateAdded','display','none'); }">Order Added
<input type="checkbox" id="dateOfSource" onclick="dccDateOfSource = 1; if(document.getElementById('dateOfSource').checked == true) { setStyleByClass('td','dclDateOfSource','display',''); setStyleByClass('td','dcDateOfSource','display',''); } else { setStyleByClass('td','dclDateOfSource','display','none'); setStyleByClass('td','dcDateOfSource','display','none'); }">Date/Time
<input type="checkbox" id="type" onclick="dccType = 1; if(document.getElementById('type').checked == true) { setStyleByClass('td','dclType','display',''); setStyleByClass('td','dcType','display',''); } else { setStyleByClass('td','dclType','display','none'); setStyleByClass('td','dcType','display','none'); }">Type
<input type="checkbox" id="code" onclick="dccCode = 1; if(document.getElementById('code').checked == true) { setStyleByClass('td','dclCode','display',''); setStyleByClass('td','dcCode','display',''); } else { setStyleByClass('td','dclCode','display','none'); setStyleByClass('td','dcCode','display','none'); }">Code
<input type="checkbox" id="flag" onclick="dccFlag = 1; if(document.getElementById('flag').checked == true) { setStyleByClass('td','dclFlag','display',''); setStyleByClass('td','dcFlag','display',''); } else { setStyleByClass('td','dclFlag','display','none'); setStyleByClass('td','dcFlag','display','none'); }">Flag
<input type="checkbox" id="cred_weight" onclick="dccCredWeight = 1; if(document.getElementById('cred_weight').checked == true) { setStyleByClass('td','dclCredWeight','display',''); setStyleByClass('td','dcCredWeight','display',''); } else { setStyleByClass('td','dclCredWeight','display','none'); setStyleByClass('td','dcCredWeight','display','none'); }">Cred Weight<?php
helpLink('rate_consistency.php#credWeight');
?>
<!--<span class="help"><sup>?</sup></span>-->
<!--<input type="checkbox" id="diag" onclick="dccDiag = 1; if(document.getElementById('diag').checked == true) { setStyleByClass('td','dclDiag','display',''); setStyleByClass('td','dcDiag','display',''); } else { setStyleByClass('td','dclDiag','display','none'); setStyleByClass('td','dcDiag','display','none'); }">Diagnosticity</p> -->
</div>
<div class="sortTools" id="sortTools_sort_hypotheses" style="display: none;">
<p><b>Sort Hypotheses Columns:</b>
示例8: helpLink
for ($i = 0; $i < sizeof($result); $i++) {
if (substr($result[$i]['name'], 0, 7) != "sqlite_" && $result[$i]['name'] != "") {
echo "<option value='" . $result[$i]['name'] . "' selected='selected'>" . $result[$i]['name'] . "</option>";
}
}
echo "</select>";
echo "<br/><br/>";
echo "<input type='radio' name='export_type' checked='checked' value='sql' onclick='toggleExports(\"sql\");'/> SQL";
echo "<br/><input type='radio' name='export_type' value='csv' onclick='toggleExports(\"csv\");'/> CSV";
echo "</fieldset>";
echo "<fieldset style='float:left; max-width:350px;' id='exportoptions_sql'><legend><b>Options</b></legend>";
echo "<input type='checkbox' checked='checked' name='structure'/> Export with structure " . helpLink("Export Structure to SQL File") . "<br/>";
echo "<input type='checkbox' checked='checked' name='data'/> Export with data " . helpLink("Export Data to SQL File") . "<br/>";
echo "<input type='checkbox' name='drop'/> Add DROP TABLE " . helpLink("Add Drop Table to Exported SQL File") . "<br/>";
echo "<input type='checkbox' checked='checked' name='transaction'/> Add TRANSACTION " . helpLink("Add Transaction to Exported SQL File") . "<br/>";
echo "<input type='checkbox' checked='checked' name='comments'/> Comments " . helpLink("Add Comments to Exported SQL File") . "<br/>";
echo "</fieldset>";
echo "<fieldset style='float:left; max-width:350px; display:none;' id='exportoptions_csv'><legend><b>Options</b></legend>";
echo "<div style='float:left;'>Fields terminated by</div>";
echo "<input type='text' value=';' name='export_csv_fieldsterminated' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>Fields enclosed by</div>";
echo "<input type='text' value='\"' name='export_csv_fieldsenclosed' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>Fields escaped by</div>";
echo "<input type='text' value='\\' name='export_csv_fieldsescaped' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>Lines terminated by</div>";
echo "<input type='text' value='AUTO' name='export_csv_linesterminated' style='float:right;'/>";
echo "<div style='clear:both;'>";
echo "<div style='float:left;'>Replace NULL by</div>";
示例9: drawAdminTools_DomainInfo
//.........这里部分代码省略.........
$unlck_sel = " selected ";
break;
case "transferprot":
$trans_sel = " selected ";
break;
default:
case "locked":
$lockd_sel = " selected ";
break;
}
$out .= dtcFormLineDraw(_("Domain protection: ") . $frm, "<select name=\"protection\">\n<option value=\"unlocked\" {$unlck_sel}>" . _("Domain name unlocked") . "</option>\n<option value=\"transferprot\" {$trans_sel}>" . _("Domain name transfer protected") . "</option>\n<option value=\"locked\" {$lockd_sel}>" . _("Domain name protected") . "</option>\n</select>", 1);
$out .= dtcFormLineDraw("", submitButtonStart() . _("Set protection") . submitButtonEnd(), 0);
$out .= "</form></table>";
}
}
// End of domain registration API code
// Retrive domain config
$quota = $eddomain["quota"];
$max_email = $eddomain["max_email"];
$max_ftp = $eddomain["max_ftp"];
$max_subdomain = $eddomain["max_subdomain"];
$domain_parking = $eddomain["domain_parking"];
$domain_parking_type = $eddomain["domain_parking_type"];
$adm_path = $admin["info"]["path"];
// Retrive disk usage
// $du_string = exec("du -sm $adm_path/$webname --exclude=access.log",$retval);
// $du_state = explode("\t",$du_string);
// $du = $du_state[0];
// The upper version might be too slow and give a bad feeling to the user. This one should be a lot better:
$du_stat = $eddomain["du_stat"];
$du = $du_stat;
// Retrive number of mailbox
if (isset($eddomain["emails"])) {
$email_nbr = sizeof($eddomain["emails"]);
} else {
$email_nbr = 0;
}
// Retrive number of ftp account
if (isset($eddomain["ftps"])) {
$ftp_nbr = sizeof($eddomain["ftps"]);
} else {
$ftp_nbr = 0;
}
// Retrive number of ftp account
$subdomain_nbr = sizeof($eddomain["subdomains"]);
$total_http_transfer = fetchHTTPInfo($webname);
$total_ftp_transfer = fetchFTPInfo($webname);
$total_pop_transfer = fetchPOPInfo($webname);
$total_imap_transfer = fetchIMAPInfo($webname);
$total_smtp_transfer = fetchSMTPInfo($webname);
$total_transfer = smartByte($total_http_transfer + $total_ftp_transfer + $total_smtp_transfer + $total_pop_transfer + $total_imap_transfer);
$out .= "<br><h3>" . _("Your domain usage and quota:") . "</h3>\n\t" . _("Total transfered bytes this month:") . " {$total_transfer}<br>\n\t" . _("Your area disk usage:") . " " . smartByte($du) . " / {$quota} MBytes<br>\n\t" . _("Mailboxes:") . " {$email_nbr} / {$max_email}<br>\n\t" . _("FTP accounts:") . " {$ftp_nbr} / {$max_ftp}<br>\n\t" . _("Subdomains:") . " {$subdomain_nbr} / {$max_subdomain}<br><br>";
$out .= "<h3>" . _("Preview URL:") . "</h3>\n\t" . _("Use") . " http(s)://" . $conf_administrative_site . "/www." . $_REQUEST["addrlink"] . " " . _("aliasing") . ":";
if ($eddomain["gen_unresolved_domain_alias"] == "yes") {
$radio_yes = " checked";
$radio_no = "";
} else {
$radio_no = " checked";
$radio_yes = "";
}
$out .= "<form action=\"" . $_SERVER["PHP_SELF"] . "\"><input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n<input type=\"hidden\" name=\"addrlink\" value=\"" . $_REQUEST["addrlink"] . "\">\n<input type=\"hidden\" name=\"edit_domain\" value=\"" . $_REQUEST["addrlink"] . "\">\n<input type=\"hidden\" name=\"adm_pass\" value=\"{$adm_pass}\">\n<input type=\"radio\" name=\"domain_gen_unresolv_alias\" value=\"yes\"{$radio_yes}>" . _("Yes") . "\n<input type=\"radio\" name=\"domain_gen_unresolv_alias\" value=\"no\"{$radio_no}>" . _("No") . "\n<input type=\"hidden\" name=\"change_unresolv_alias\" value=\"Ok\"><br>" . submitButtonStart() . _("Ok") . submitButtonEnd() . "</form><br><br>";
$out .= "<h3>" . _("Domain parking:") . "</h3>";
$out .= _("This domain will be the alias of the following domain (domain parking):");
$out .= "<form action=\"" . $_SERVER["PHP_SELF"] . "\"><input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n<input type=\"hidden\" name=\"addrlink\" value=\"" . $_REQUEST["addrlink"] . "\">\n<input type=\"hidden\" name=\"edit_domain\" value=\"" . $_REQUEST["addrlink"] . "\">\n<input type=\"hidden\" name=\"adm_pass\" value=\"{$adm_pass}\">\n<input type=\"hidden\" name=\"set_domain_parcking\" value=\"Ok\">\n<select name=\"domain_parking_value\">\n<option value=\"no-parking\">" . _("No parking") . "</option>\n";
$q = "SELECT name FROM {$pro_mysql_domain_table} WHERE owner='{$adm_login}' AND domain_parking='no-parking' AND name NOT LIKE '" . $_REQUEST["addrlink"] . "';";
$r = mysql_query($q) or die("Cannot query \"{$q}\" line " . __LINE__ . " in file " . __FILE__ . " sql said: " . mysql_error());
$n = mysql_num_rows($r);
for ($i = 0; $i < $n; $i++) {
$a = mysql_fetch_array($r);
if ($domain_parking == $a["name"]) {
$checked = " selected ";
} else {
$checked = "";
}
$out .= "<option value=\"" . $a["name"] . "\"{$checked}>" . $a["name"] . "</option>";
}
$out .= "</select><br>";
$redirect_selected = " ";
$same_docroot_selected = " ";
$serveralias_selected = " ";
switch ($domain_parking_type) {
case "redirect":
$redirect_selected = " checked ";
break;
case "same_docroot":
$same_docroot_selected = " checked ";
break;
case "serveralias":
$serveralias_selected = " checked ";
break;
}
$out .= "<input type=\"radio\" name=\"domain_parking_type\" value=\"redirect\" {$redirect_selected}>" . _("Redirection") . " ";
$out .= "<input type=\"radio\" name=\"domain_parking_type\" value=\"same_docroot\" {$same_docroot_selected}>" . _("Same DocumentRoot") . " ";
$out .= "<input type=\"radio\" name=\"domain_parking_type\" value=\"serveralias\" {$serveralias_selected}>" . _("ServerAlias") . " ";
$out .= "<br>" . submitButtonStart() . _("Ok") . submitButtonEnd() . "</form><br><br>";
$out .= "<h3>" . _("Domain configuration backup:") . "</h3>";
$out .= "<a href=\"?adm_login={$adm_login}&adm_pass={$adm_pass}&action=export_domain&addrlink=" . $_REQUEST["addrlink"] . "\" target=\"_blank\">" . _("Export this domain to a file") . "</a>";
$out .= "<br><br>" . helpLink("UserDoc/Domain-General-Config");
return $out;
}
示例10: helpLink
if ($active_project->classification == 'S') {
echo 'selected';
}
?>
>Secret</option>
<option value="TS" <?php
if ($active_project->classification == 'TS') {
echo 'selected';
}
?>
>Top Secret</option>
</select></p>
<br/>
<div class="privacySettings">
<h3>Project Privacy <?php
helpLink('howto_project_management.php#project_privacy');
?>
</h3>
<br />
<p class="formNote">Note: The below options enable you to decide whether your project
is listed in your organization's directory of ACH projects, and, if so, the
circumstances under which others may view or join your project. The
directory provides a basic description of the project and lists its participants.</p><br />
<input type="radio" name="directory" value="n" onClick="Disab(1)" <?php
if ($active_project->directory == 'n') {
echo 'checked';
}
?>
/><strong>Private Project</strong>
<p class="formNote">This project will not be listed in the directory. You will select and communicate directly with any individuals whom you
示例11: drawAdminTools_Emails
function drawAdminTools_Emails($domain)
{
global $adm_login;
global $adm_pass;
global $edit_domain;
global $edit_mailbox;
global $addrlink;
global $cyrus_used;
global $cyrus_default_quota;
global $CYRUS;
global $conf_hide_password;
global $pro_mysql_pop_table;
checkLoginPassAndDomain($adm_login, $adm_pass, $domain["name"]);
$out = "";
$dsc = array("title" => _("List of your mailboxes:"), "new_item_title" => _("New mailbox"), "new_item_link" => _("new mailbox"), "edit_item_title" => _("Mailbox configuration:"), "table_name" => $pro_mysql_pop_table, "action" => "pop_access_editor", "forward" => array("adm_login", "adm_pass", "addrlink"), "id_fld" => "autoinc", "list_fld_show" => "id", "max_item" => $domain["max_email"], "num_item_txt" => _("Number of active mailboxes:"), "create_item_callback" => "emailAccountsCreateCallback", "delete_item_callback" => "emailAccountsDeleteCallback", "edit_item_callback" => "emailAccountsEditCallback", "where_list" => array("mbox_host" => $domain["name"]), "check_unique" => array("id"), "check_unique_msg" => _("There is already a mailbox by that name"), "order_by" => "id", "cols" => array("autoinc" => array("type" => "id", "display" => "no", "legend" => _("Login:")), "id" => array("type" => "text", "disable_edit" => "yes", "check" => "dtc_login_or_email", "happen" => "@" . $domain["name"], "legend" => _("Login:")), "memo" => array("type" => "text", "help" => _("This text is just a memo for yourself, and will not really be used."), "legend" => _("Name:")), "passwd" => array("type" => "password", "check" => "dtc_pass", "legend" => _("Password:")), "spam_mailbox_enable" => array("type" => "checkbox", "help" => _("If selected, spams will be sent in a SPAM folder and wont reach your inbox. Later you can check this folder with the webmail or using IMAP."), "values" => array("yes", "no"), "legend" => _("Enable SPAM filtering: ")), "spam_mailbox" => array("type" => "text", "help" => _("Name of the SPAM folder to receive the spam (the above option has to be activated)."), "default" => "SPAM", "legend" => _("SPAM mailbox destination: "))));
if ($cyrus_used) {
$dsc["cols"]["quota_size"] = array("type" => "text", "check" => "number", "default" => "{$cyrus_default_quota}", "legend" => _("Mailbox quota: "));
$dsc["cols"]["quota_used"] = array("type" => "readonly", "hide_create" => "yes", "callback" => "getCyrusUsedQuota", "happen" => _("MBytes"), "legend" => _("Used quota: "));
} else {
$dsc["cols"]["quota_size"] = array("type" => "text", "check" => "max_value_2096", "default" => "10", "happen" => _("MBytes"), "help" => _("Setting BOTH the number of files and overall mailbox size to zero will disable quota."), "legend" => _("Mailbox quota: "));
$dsc["cols"]["quota_files"] = array("type" => "text", "check" => "number", "default" => "1024", "happen" => _("files"), "legend" => _("Mailbox max files quota: "));
$dsc["cols"]["redirect1"] = array("type" => "text", "check" => "email", "can_be_empty" => "yes", "empty_makes_sql_null" => "yes", "legend" => _("Redirection 1: "));
$dsc["cols"]["redirect2"] = array("type" => "text", "check" => "email", "can_be_empty" => "yes", "empty_makes_sql_null" => "yes", "legend" => _("Redirection 2: "));
$dsc["cols"]["localdeliver"] = array("type" => "checkbox", "values" => array("yes", "no"), "legend" => _("Deliver messages locally in INBOX: "));
$dsc["cols"]["vacation_flag"] = array("type" => "checkbox", "values" => array("yes", "no"), "default" => "no", "legend" => _("Check to send a bounce message (vacation): "));
$dsc["cols"]["vacation_text"] = array("type" => "textarea", "legend" => _("Bounce message content: "), "cols" => "40", "rows" => "7");
}
$list_items = dtcListItemsEdit($dsc);
// We have to query again, in case something has changed
$q = "SELECT id FROM {$pro_mysql_pop_table} WHERE mbox_host='" . $domain["name"] . "';";
$r = mysql_query($q) or die("Cannot query {$q} line: " . __LINE__ . " file " . __FILE__ . " sql said:" . mysql_error());
$n = mysql_num_rows($r);
$catch_popup = "<option value=\"no-mail-account\">" . _("No catch-all") . "</option>";
for ($i = 0; $i < $n; $i++) {
$a = mysql_fetch_array($r);
if ($a["id"] == $domain["catchall_email"]) {
$selected = " selected ";
} else {
$selected = " ";
}
$catch_popup .= "<option value=\"" . $a["id"] . "\" {$selected}>" . $a["id"] . "</option>";
}
$out .= "<b><u>" . _("Catch-all email set to deliver to") . ":</u></b><br>";
$out .= "<form action=\"" . $_SERVER["PHP_SELF"] . "\">\n\t<input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n\t<input type=\"hidden\" name=\"adm_pass\" value=\"{$adm_pass}\">\n\t<input type=\"hidden\" name=\"addrlink\" value=\"{$addrlink}\">\n\t<input type=\"hidden\" name=\"edit_domain\" value=\"{$edit_domain}\">\n\tCatchall: <input type=\"hidden\" name=\"action\" value=\"set_catchall_account\">\n\t<select name=\"catchall_popup\">{$catch_popup}</select><input type=\"image\" src=\"gfx/stock_apply_20.png\">\n</form>";
$out .= $list_items;
$out .= helpLink("PmWiki/Email-Accounts");
return $out;
}
示例12: help
function help($topic)
{
return helpLink($topic);
}
示例13: drawAdminTools_Subdomain
//.........这里部分代码省略.........
global $adm_pass;
global $edit_domain;
global $addrlink;
global $conf_administrative_site;
global $conf_hide_password;
global $edit_a_subdomain;
global $dtcshared_path;
global $pro_mysql_nameservers_table;
global $pro_mysql_subdomain_table;
global $pro_mysql_ssl_ips_table;
$txt = "";
checkLoginPassAndDomain($adm_login, $adm_pass, $domain["name"]);
$nbr_subdomain = sizeof($domain["subdomains"]);
$max_subdomain = $domain["max_subdomain"];
// Let's start a form !
$frm = "<form action=\"?\" methode=\"post\">\n<input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n<input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n<input type=\"hidden\" name=\"adm_pass\" value=\"{$adm_pass}\">\n<input type=\"hidden\" name=\"addrlink\" value=\"{$addrlink}\">\n<input type=\"hidden\" name=\"edit_domain\" value=\"{$edit_domain}\">\n<input type=\"hidden\" name=\"whatdoiedit\" value=\"subdomains\">";
$txt .= $frm;
// Popup for choosing default subdomain.
$subdomains = $domain["subdomains"];
$txt .= "<table><tr><td align=\"right\">";
$txt .= _("Default subdomain: ") . "</td><td><select name=\"subdomaindefault_name\">";
for ($i = 0; $i < $nbr_subdomain; $i++) {
$sub = $subdomains[$i]["name"];
if ($domain["default_subdomain"] == "{$sub}") {
$txt .= "<option value=\"{$sub}\" selected>{$sub}</option>";
} else {
$txt .= "<option value=\"{$sub}\">{$sub}</option>";
}
}
$txt .= "</select></td></tr>";
// Radio to choose wildcard or not
if ($domain["wildcard_dns"] == "yes") {
$yes_flag = " checked ";
$no_flag = " ";
} else {
$yes_flag = " ";
$no_flag = " checked ";
}
$txt .= "<tr><td align=\"right\">" . _("Use as wildcard for the domain:") . " </td><td><input type=\"radio\" name=\"wildcard_dns\" value=\"yes\"{$yes_flag}>" . _("Yes") . "<input type=\"radio\" name=\"wildcard_dns\" value=\"no\"{$no_flag}>" . _("No") . "</td></tr>";
// Radio to activate the ServerAlias on the default subdomain
if ($domain["default_sub_server_alias"] == "yes") {
$yes_flag = " checked ";
$no_flag = " ";
} else {
$yes_flag = " ";
$no_flag = " checked ";
}
$txt .= "<tr><td align=\"right\">" . _("Generate a ServerAlias for the root of the domain:") . " </td><td><input type=\"radio\" name=\"default_sub_server_alias\" value=\"yes\"{$yes_flag}>" . _("Yes") . "<input type=\"radio\" name=\"default_sub_server_alias\" value=\"no\"{$no_flag}>" . _("No") . "</td></tr>";
// Apply button
$txt .= "<tr><td></td><td><input type=\"hidden\" name=\"subdomaindefault\" value=\"Ok\"><input type=\"image\" src=\"gfx/stock_apply_20.png\"></td></tr></table></form>";
$txt .= $frm . "";
$dsc = array("title" => _("List of your subdomains: "), "new_item_title" => _("Create a subdomain: "), "new_item_link" => _("New subdomain"), "edit_item_title" => _("Edit one of your subdomains"), "table_name" => $pro_mysql_subdomain_table, "action" => "subdomain_editor", "forward" => array("adm_login", "adm_pass", "addrlink"), "id_fld" => "id", "list_fld_show" => "subdomain_name", "max_item" => $max_subdomain, "num_item_txt" => _("Number of active subdomains:"), "create_item_callback" => "subdomainCreateDirsCallBack", "delete_item_callback" => "subdomainDeleteDirsCallBack", "edit_item_callback" => "subdomainEditCallBack", "order_by" => "subdomain_name", "where_list" => array("domain_name" => $domain["name"]), "cols" => array("id" => array("type" => "id", "display" => "no", "legend" => "id"), "subdomain_name" => array("type" => "text", "check" => "subdomain", "disable_edit" => "yes", "legend" => _("Subdomain name: ")), "ip" => array("type" => "text", "check" => "subdomain_or_ip", "can_be_empty" => "yes", "empty_makes_default" => "yes", "legend" => _("IP address or CNAME: ")), "ip6" => array("type" => "text", "check" => "ip6", "can_be_empty" => "yes", "empty_makes_default" => "yes", "legend" => _("IPv6 address: ")), "generate_vhost" => array("type" => "radio", "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "legend" => _("Generate a vhost entry for this subdomain:")), "add_default_charset" => array("type" => "popup", "values" => array("dtc-wont-add", "Off", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-12", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "ISO-2022-JP", "ISO-2022-KR", "ISO-2022-CN", "Big5", "cn-Big5", "WINDOWS-1251", "CP866", "KOI8", "KOI8-E", "KOI8-r", "KOI8-U", "KOI8-ru", "ISO-10646-UCS-2", "ISO-10646-UCS-4", "UTF-7", "UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", "UTF-32LE", "euc-cn", "euc-gb", "euc-jp", "euc-kr", "EUC-TW", "gb2312", "iso-10646-ucs-2", "iso-10646-ucs-4", "shift_jis"), "legend" => "AddDefaultCharset"), "srv_record" => array("type" => "text", "can_be_empty" => "yes", "legend" => _("This subdomain is a service (SRV)<br>entry for the following port: ")), "srv_record_protocol" => array("type" => "radio", "values" => array("tcp", "udp", "sctp"), "default" => "tcp", "legend" => _("SRV protocol: ")), "register_globals" => array("type" => "radio", "values" => array("yes", "no"), "default" => "no", "display_replace" => array(_("Yes"), _("No")), "legend" => _("Use register_globals=1: ")), "associated_txt_record" => array("type" => "text", "legend" => _("TXT field of the subdomain: ")), "nameserver_for" => array("type" => "text", "check" => "domain_or_ip", "can_be_empty" => "yes", "legend" => _("This subdomain is a nameserver (NS)<br>entry for the following subdomain: "))));
if ($domain["safe_mode"] == "no") {
$dsc["cols"]["safe_mode"] = array("type" => "radio", "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "legend" => "PHP safe mode: ");
}
if ($domain["sbox_protect"] == "no") {
$dsc["cols"]["sbox_protect"] = array("type" => "radio", "values" => array("yes", "no"), "display_replace" => array(_("Yes"), _("No")), "legend" => _("Sbox cgi-bin protection: "));
}
// Get all SSL IPs asigned to this customer
$q = "SELECT * FROM {$pro_mysql_ssl_ips_table} WHERE adm_login='{$adm_login}' AND available='no';";
$r = mysql_query($q) or die("Cannot query {$q} line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
$n = mysql_num_rows($r);
if ($n != 0) {
$ssl_ips = array();
$ssl_ips[] = "none";
// Check if some SSL certs are free, or used by current subdomain
for ($i = 0; $i < $n; $i++) {
$a = mysql_fetch_array($r);
$nbr_domains = sizeof($admin["data"]);
$used_by = "none";
for ($j = 0; $j < $nbr_domains; $j++) {
$nbr_subdomains = sizeof($admin["data"][$j]["subdomains"]);
for ($k = 0; $k < $nbr_subdomains; $k++) {
if ($admin["data"][$j]["subdomains"][$k]["ssl_ip"] == $a["ip_addr"]) {
// The cert is used by current subdomain
if (isset($_REQUEST["item"]) && isset($_REQUEST["subaction"]) && $_REQUEST["subaction"] == "subdomain_editor_edit_item" && $_REQUEST["item"] == $admin["data"][$j]["subdomains"][$k]["id"]) {
$ssl_ips[] = $a["ip_addr"];
// The cert is used by another subdomain, don't show it...
} else {
$used_by = $admin["data"][$j]["name"] . $admin["data"][$j]["subdomains"][$k]["name"];
}
}
}
}
if ($used_by == "none") {
$ssl_ips[] = $a["ip_addr"];
}
}
$dsc["cols"]["ssl_ip"] = array("type" => "popup", "values" => $ssl_ips, "legend" => _("Use an SSL vhost using this IP: "));
}
// Check to see if there is some SSL IPs for that customer
$q = "SELECT * FROM {$pro_mysql_ssl_ips_table} WHERE adm_login='{$adm_login}' AND available='no';";
$r = mysql_query($q) or die("Cannot query \"{$q}\" line " . __LINE__ . " file " . __FILE__ . " sql said: " . mysql_error());
$dsc["cols"]["login"] = array("type" => "text", "check" => "dtc_login", "empty_makes_sql_null" => "yes", "can_be_empty" => "yes", "legend" => _("Dynamic IP update login: "));
$dsc["cols"]["pass"] = array("type" => "password", "check" => "dtc_pass", "empty_makes_sql_null" => "yes", "can_be_empty" => "yes", "legend" => _("Dynamic IP update password: "));
$txt .= dtcListItemsEdit($dsc);
$txt .= "<br>" . _("Windows users (and UNIX users running WINE) can update their IP address dynamically by downloading and installing the following open source DTC client:") . "<br>" . "<a href=\"http://www.gplhost.com/DTC-Dynamic_IP_updater.exe\">DTC-Dynamic_IP_updater.exe</a><br>" . _("For unix users, a simple wget command in a cron joe like below will do. Something like this:") . "<br>" . htmlspecialchars("wget https://" . $conf_administrative_site . "/dtc/dynip.php?login=MYLOGIN&pass=MYPASS&domain=" . $domain["name"] . "&ip=1.2.3.4") . "<br>";
$txt .= helpLink("PmWiki/Subdomains");
return $txt;
}
示例14: drawAdminTools_VPSInstallation
//.........这里部分代码省略.........
}
$out .= "<option value=\"{$os_name}\" {$selected}>{$os_name} (" . _("operating system image") . ")</option>";
}
$installable_app = getInstallableAPP($soap_client);
$nbr_app = sizeof($installable_app);
for ($i = 0; $i < $nbr_app; $i++) {
$app_name = $installable_app[$i];
if ($vps["operatingsystem"] == $os_name) {
$selected = " selected ";
} else {
$selected = "";
}
$out .= "<option value=\"{$app_name}\" {$selected}>{$app_name} (" . _("applicance builder") . ")</option>";
}
$out .= "</select></td></tr>\n<tr><td>" . "VPS root password:" . " </td><td><input type=\"password\" name=\"root_password\"><input type=\"hidden\" name=\"action\" value=\"reinstall_os\"></td></tr>\n<tr><td></td><td>" . submitButtonStart() . _("Reinstall operating system") . submitButtonEnd() . "\n</td></tr></table></form>";
// }
// BSD kernel change popup
if ($vps["operatingsystem"] == "netbsd") {
if ($vps["bsdkernel"] == "install") {
$normal_selected = " ";
$install_selected = " selected ";
} else {
$normal_selected = " selected ";
$install_selected = " ";
}
$out .= $frm_start . "<select name=\"bsdkernel\">\n <option value=\"normal\" {$normal_selected}>Normal</option>\n <option value=\"install\" {$install_selected}>Install</option>\n </select><input type=\"hidden\" name=\"action\" value=\"change_bsd_kernel_type\">\n " . submitButtonStart() . _("Change NetBSD kernel") . submitButtonEnd() . "\n </form>";
}
if ($vps["operatingsystem"] == "xenhvm") {
$vps_xenhvm_iso = getVPSIso($vps_node, $vps_name, $soap_client);
$out .= "<br><br>" . _("To upload .iso files so they appear below and you can boot on them, you can upload them using ftp, ") . "xen{$vps_name}@{$vps_node}" . _(" using the password of your physical console.") . "<br><br>";
$boot_device_selector = "<select name=\"xenhvm_iso\">\n<option value=\"hdd\">" . _("Boot on hard drive") . "</option>";
$n_iso = sizeof($vps_xenhvm_iso);
if (is_array($vps_xenhvm_iso)) {
for ($i = 0; $i < $n_iso; $i++) {
$iso = $vps_xenhvm_iso[$i];
if ($vps["howtoboot"] == $iso) {
$selected = " selected ";
} else {
$selected = " ";
}
$boot_device_selector .= "<option value=\"" . htmlspecialchars($iso) . "\" {$selected}>" . htmlspecialchars($iso) . "</option>";
}
}
$boot_device_selector .= "</select>";
if ($vps["vncpassword"] == "no_vnc") {
$vncons_act_yes_selected = " ";
$vncons_act_no_selected = " checked ";
} else {
$vncons_act_yes_selected = " ";
$vncons_act_no_selected = " checked ";
}
$out .= dtcFormTableAttrs();
$out .= dtcFormLineDraw($frm_start . _("Boot device: "), "<input type=\"hidden\" name=\"action\" value=\"change_xenhvm_boot_iso\">" . $boot_device_selector, 1);
$out .= dtcFormLineDraw(_("VNC console password: "), "<input type=\"text\" name=\"vnc_console_pass\" value=\"\">", 0);
$out .= dtcFormLineDraw(_("VNC console activation: "), "<input type=\"radio\" name=\"vnc_console_activate\" value=\"yes\" {$vncons_act_yes_selected}>" . _("yes") . " <input type=\"radio\" name=\"vnc_console_activate\" value=\"no\" {$vncons_act_no_selected}>" . _("no"), 1);
$out .= dtcFormLineDraw("", submitButtonStart() . _("Write parameters") . submitButtonEnd(), 0);
$out .= "</table></form>";
}
}
}
}
$out .= "<br><br>";
// SSH Physical console password changing
$out .= "<h3>" . _("Physical console last display and ssh access:") . "</h3><br>";
$out .= "Once your VPS is installed, ssh to the physical console to use it for the first time." . "<br><br>";
$out .= dtcFormTableAttrs();
$out .= dtcFormLineDraw($frm_start . "<input type=\"hidden\" name=\"action\" value=\"change_xm_console_ssh_passwd\">" . _("New SSH password: "), "<input size=\"40\" type=\"text\" name=\"new_password\" value=\"\"></td><td>" . submitButtonStart() . _("Ok") . submitButtonEnd() . "</form>", 1);
$out .= dtcFormLineDraw($frm_start . "<input type=\"hidden\" name=\"action\" value=\"change_xm_console_ssh_key\">" . _("New SSH key: "), "<input size=\"40\" type=\"text\" name=\"new_key\" value=\"\"></td><td>" . submitButtonStart() . _("Ok") . submitButtonEnd() . "</form>", 0);
$out .= "</table>";
$out .= "<br><br>" . _("To access to your console, first enter a ssh password or key above, and then ssh to:") . "<br>xen" . $vps_name . "@" . $vps_node . "<br><br>";
$out .= "<br>" . _("You should then install sshd in your VPS and use the physical console only for debugging purposes.");
$out .= "<br>" . helpLink("PmWiki/Setup-A-VPS-Once-DTC-Xen-Installed-It");
/* FIXME probably don't need any of this stuff'
if($reinstall_os == 1){
if($panel_type == "admin"){
$path_url = "/dtcadmin";
}else{
$path_url = "/dtc";
}
$ajax_url = "https://".$_SERVER["SERVER_NAME"].$path_url."/xanjaxPushlet.php?";
$ajax_auth = "adm_login=".$adm_login."&adm_pass=".$adm_pass."&vps_node=".$vps_node."&vps_name=".$vps_name;
$r = "";
}else{
$r = $soap_client->call("getVPSInstallLog",array("vpsname" => $vps_name,"numlines" => "20"),"","","");
$err = $soap_client->getError();
if($err){
$r = _("Could not get VPS install log. Error: ").$err._(" maybe there are no logs yet?");
}
// print_r($r);
$r = str_replace("\n\n","\n",$r);
}
*/
// tested AJAX stuff starts here
$out .= "<script language=\"javascript\" src=\"xanjaxXHR.js\"></script>";
$out .= "<h3>" . _("Installation log (last 20 lines):") . "</h3><br>";
$out .= "<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\">\n<tr><td bgcolor=\"black\"><font color=\"white\">{$vps_node}:{$vps_name}</font></td>\n<tr><td bgcolor=\"black\"><font color=\"white\"><pre id=\"reinstall_os_log\" class=\"reinstall_os_log\"><font color=\"red\">dtc-xen</font>@<font color=\"blue\">{$vps_node}</font>>_ #<br>...</pre></font></td>\n</table>";
$out .= "\n\t\t<script type=\"text/javascript\">\n\t\t\txanGet(logPushlet,\"logPushlet.php?vps_node=" . $vps_node . "&vps_name=" . $vps_name . "\");\n\t\t</script>";
return $out;
}