function add_www_import() { $boot = new boostrap_form(); $boot->set_formdescription("{free_catgorized_explain}"); $boot->set_hidden("category", $_GET["category"]); $boot->set_checkbox("ForceCat", "{force}", 0, array("TOOLTIP" => "{free_cat_force_explain}")); $boot->set_textarea("categorize", "{items}", null, array("HEIGHT" => 250)); $boot->set_button("{add}"); $boot->set_RefreshSearchs(); $boot->set_RefreshSearchsForced(); echo $boot->Compile(); }
function wizard_popup() { $boot = new boostrap_form(); $tpl = new templates(); $ID = $_GET["ID"]; $sock = new sockets(); $ApacheDisableModDavFS = $sock->GET_INFO("ApacheDisableModDavFS"); if (!is_numeric($ApacheDisableModDavFS)) { $ApacheDisableModDavFS = 0; } $users = new usersMenus(); $q = new mysql(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT maxsize FROM storage_containers WHERE `groupid`='" . mysql_escape_string2($_GET["gpid"]) . "'", "artica_backup")); $maxsize = $ligne["maxsize"]; if ($maxsize == 0) { $maxsizeText = $tpl->_ENGINE_parse_body("{unlimited} "); } else { $maxsizeText = $maxsize; } if ($maxsize > 0) { if ($ID == 0) { $uidenc = mysql_escape_string2($_SESSION["uid"]); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT SUM(container_size) as tSize FROM users_containers WHERE `uid`='{$uidenc}'", "artica_backup")); $tSize = $ligne["tSize"]; if ($tSize >= $maxsize) { senderror("{error_quota_exceed}"); } } } $ligne = array(); if ($ID > 0) { $q = new mysql(); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM users_containers WHERE `container_id`='{$ID}'", "artica_backup")); $boot->set_formtitle("{$ligne["container_name"]} ({$ligne["container_size"]}MB)"); } if ($ligne["container_name"] == null) { $ligne["container_name"] = $tpl->_ENGINE_parse_body("{new_container}"); } if ($maxsize > 0) { if (!is_numeric($ligne["container_size"])) { $ligne["container_size"] = $maxsize; } } $new_container_user_explain = $tpl->_ENGINE_parse_body("{new_container_user_explain}"); $new_container_user_explain = str_replace("%S", $maxsize, $new_container_user_explain); if ($ID == 0) { $boot->set_formdescription($new_container_user_explain); } $boot->set_hidden("gpid", $_GET["gpid"]); $boot->set_hidden("ID", $_GET["ID"]); $boot->set_field("container_name", "{container_name}", $ligne["container_name"], array("ENCODE" => true)); if ($ID == 0) { $boot->set_field("container_size", "{container_size}", $ligne["container_size"], array("TOOLTIP" => "{container_size_explain}")); } else { $boot->set_hidden("container_size", $ligne["container_size"]); } $webdav_creds = unserialize(base64_decode($ligne["webdav_creds"])); if ($webdav_creds["username"] == null) { $webdav_creds["username"] = $_SESSION["uid"]; } if ($ApacheDisableModDavFS == 0) { $boot->set_checkbox("webdav", "{http_sharing}", $ligne["webdav"], array("TOOLTIP" => "{container_http_sharing_explain}")); } if ($users->ISCSI_INSTALLED) { if (!is_numeric($ligne["iscsid"])) { $ligne["iscsid"] = 0; } $boot->set_checkbox("iscsid", "{network_disk}", $ligne["iscsid"], array("TOOLTIP" => "{container_iscsid_sharing_explain}")); } $lengthpass = strlen($webdav_creds["password"]); $boot->set_field("webdav_username", "{username}", $webdav_creds["username"], array("ENCODED" => true)); $boot->set_fieldpassword("webdav_password", "{password} ({$lengthpass} chars)", $webdav_creds["password"], array("ENCODED" => true)); if ($ID == 0) { $boot->set_button("{create}"); } else { $boot->set_button("{apply}"); } $boot->set_RefreshSearchs(); $boot->set_RefreshSearchsForced(); echo $boot->Compile(); }