Beispiel #1
0
 public static function getZpanelUpdates()
 {
     if (ctrl_options::GetSystemOption('dbversion') < ctrl_options::GetSystemOption('latestzpversion')) {
         $msg = ui_language::translate("There are currently new updates for your ZPanel installation, please download the latest release") . " (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>) from <a href=\"http://www.zpanelcp.com/\">http://www.zpanelcp.com/</a>.";
     } elseif (ctrl_options::GetSystemOption('dbversion') == ctrl_options::GetSystemOption('latestzpversion')) {
         $msg = "Congratulations, You are running the most recent version of ZPanel (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>)!";
     } else {
         $msg = "You appear to be running a BETA release, unless you are testing or developing we recommend you download and use the latest stable release (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>).";
     }
     return $msg;
 }
 public static function Template()
 {
     global $controller;
     if (!$controller->GetControllerRequest('URL', 'module')) {
         $line = "";
         $modcats = ui_moduleloader::GetModuleCats();
         foreach ($modcats as $modcat) {
             $mods = ui_moduleloader::GetModuleList($modcat['mc_id_pk'], "modadmin");
             if ($mods) {
                 $line .= "<table class=\"zcat\">";
                 $line .= "<tr>";
                 $line .= "<th align=\"left\">";
                 $line .= "<a name=\"" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\"></a>";
                 $line .= "" . ui_language::translate($modcat['mc_name_vc']) . "";
                 $line .= "<a href=\"#\" class=\"zcat\" id=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "_a\"></a>";
                 $line .= "</th>";
                 $line .= "</tr>";
                 $line .= "<tr>";
                 $line .= "<td align=\"left\">";
                 $line .= "<div class=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\" id=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\">";
                 $line .= "<table class=\"zcatcontent\" align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
                 $line .= "<tr>";
                 $line .= "<td>";
                 $line .= "<table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
                 $line .= "<tr>";
                 $icons_per_row = ctrl_options::GetSystemOption('module_icons_pr');
                 $num_icons = 0;
                 foreach ($mods as $mod) {
                     //$translatename = '<: '.$mod['mo_name_vc'].' :>';
                     //$translatename = $mod['mo_name_vc'];
                     $translatename = ui_language::translate($mod['mo_name_vc']);
                     $cleanname = str_replace(" ", "ZP(br)", $translatename);
                     if ($num_icons == $icons_per_row) {
                         $line .= "</tr><tr>";
                         $num_icons = 0;
                     }
                     $line .= "<td style=\"text-align:center;\" align=\"left\">";
                     $line .= "<a href=\"?module=" . $mod['mo_folder_vc'] . "\" title=\"<: " . $mod['mo_desc_tx'] . " :>\">";
                     $line .= "<img src=\"modules/" . $mod['mo_folder_vc'] . "/assets/icon.png\" border=\"0\" />";
                     $line .= "</a>";
                     $line .= "<br />";
                     $line .= "<a href=\"?module=" . $mod['mo_folder_vc'] . "\">" . $cleanname . "</a>";
                     $line .= "</td>";
                     $num_icons++;
                 }
                 $line .= "</tr></table></td></tr></table></div></td></tr></table><br>";
             }
         }
         return $line;
     }
 }
 public static function getSentoraUpdates()
 {
     $installed = ctrl_options::GetSystemOption('dbversion');
     $lastest = ctrl_options::GetSystemOption('latestzpversion');
     $lastest_tagged = ' (<strong>' . $lastest . '</strong>)';
     if ($installed < $lastest) {
         $msg = ui_language::translate('There are currently new updates for your Sentora installation, please download the latest release') . $lastest_tagged . ' from <a href="http://www.sentora.org/">http://www.sentora.org/</a>.';
     } elseif ($installed == $lastest) {
         $msg = 'Congratulations, You are running the most recent version of Sentora' . $lastest_tagged . '!';
     } else {
         $msg = 'You are running a BETA release (<strong>' . $installed . '</strong>), thank you to report what you observed.<br>' . '<b>Do not use it for production.</b>';
         if ($latest >= '1.0.3') {
             $msg .= '<br><br>Unless you are testing or developing we recommend you to download and use the latest stable release' . $lastest_tagged . '.';
         }
     }
     return $msg;
 }
 public static function getServices()
 {
     global $controller;
     if (file_exists(ui_tpl_assetfolderpath::Template() . 'img/modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/up.gif') && file_exists(ui_tpl_assetfolderpath::Template() . 'img/modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/down.gif')) {
         $iconpath = '<img src="' . ui_tpl_assetfolderpath::Template() . 'img/modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/';
     } else {
         $iconpath = '<img src="modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/';
     }
     $line = "<h2>" . ui_language::translate("Checking status of services...") . "</h2>";
     $line .= "<table>";
     $status = fs_director::CheckForEmptyValue(sys_monitoring::PortStatus($PortNum));
     $line .= '<tr><th>HTTP</th><td>' . module_controller::status_port(80, $iconpath) . '</td></tr>';
     $line .= '<tr><th>FTP</th><td>' . module_controller::status_port(21, $iconpath) . '</td></tr>';
     $line .= '<tr><th>SMTP</th><td>' . module_controller::status_port(25, $iconpath) . '</td></tr>';
     $line .= '<tr><th>POP3</th><td>' . module_controller::status_port(110, $iconpath) . '</td></tr>';
     $line .= '<tr><th>IMAP</th><td>' . module_controller::status_port(143, $iconpath) . '</td></tr>';
     $line .= '<tr><th>MySQL</th><td>' . module_controller::status_port(3306, $iconpath) . '</td></tr>';
     $line .= '<tr><th>DNS</th><td>' . module_controller::status_port(53, $iconpath) . '</td></tr>';
     $line .= '</table>';
     $line .= '<br><h2>' . ui_language::translate('Server Uptime') . '</h2>';
     $line .= ui_language::translate('Uptime') . ": " . sys_monitoring::ServerUptime();
     return $line;
 }
Beispiel #5
0
 /**
  * Used to translate a text string into the language preference of the user.
  * @author Pascal Peyremorte (p.peyremorte@wanadoo.fr)
  * @global db_driver $zdbh The ZPX database handle.
  * @param $message The string to translate.
  * @return string The transalated string.
  */
 static function translate($message)
 {
     global $zdbh;
     if (empty(self::$LangCol)) {
         $uid = ctrl_auth::CurrentUserID();
         $sql = $zdbh->prepare('SELECT ud_language_vc FROM x_profiles WHERE ud_user_fk=' . $uid);
         $sql->execute();
         $lang = $sql->fetch();
         self::$LangCol = 'tr_' . $lang['ud_language_vc'] . '_tx';
     }
     if (self::$LangCol == 'tr_en_tx') {
         return $message;
     }
     //no translation required, english used
     $SlashedMessage = addslashes($message);
     //protect special chars
     $sql = $zdbh->prepare('SELECT ' . self::$LangCol . ' FROM x_translations WHERE tr_en_tx =:message');
     $sql->bindParam(':message', $SlashedMessage);
     $sql->execute();
     $result = $sql->fetch();
     if ($result) {
         if (!fs_director::CheckForEmptyValue($result[self::$LangCol])) {
             return $result[self::$LangCol];
         } else {
             return $message;
         }
         //translated message empty
     } else {
         //message not found in the table
         //add unfound message to the table with empties translations
         $sql = $zdbh->prepare('INSERT INTO x_translations SET tr_en_tx=:message');
         $sql->bindParam(':message', $SlashedMessage);
         $sql->execute();
         return $message;
     }
 }
Beispiel #6
0
 static function getPackageSelection()
 {
     global $controller;
     $toReturn = "";
     $packages = new xml_reader(fs_filehandler::ReadFileContents("./modules/" . $controller->GetControllerRequest('URL', 'module') . "/packages/packages.xml"));
     $packages->Parse();
     $toReturn .= "\n\t\t(Sortable columns - click on column header)\n\t\t<table class=\"table table-striped sortable\" border=\"0\" width=\"100%\">\n\t\t  <tr>\n\t\t\t<th>" . ui_language::translate("Package") . "<br />\n\t\t\t" . ui_language::translate("Name") . "</th>\n\t\t\t<th>" . ui_language::translate("Version") . "<br />\n\t\t\t" . ui_language::translate("Number") . "</th>\n\t\t\t<th>" . ui_language::translate("Package") . "<br />\n\t\t\t" . ui_language::translate("Type") . "</th>\n\t\t\t<th>" . ui_language::translate("Package") . "<br />\n\t\t\t" . ui_language::translate("Description") . "</th>\n\t\t\t<th>" . ui_language::translate("Database") . "<br />\n\t\t\t" . ui_language::translate("Required") . "?</th>\n\t\t\t<th>&nbsp;</th>\n\t\t  </tr>";
     foreach ($packages->document->package as $package) {
         // START - Info and DB tags by tgates
         if ($package->db[0]->tagData == 'yes') {
             $package->pkgdb[0]->tagData = "yes";
         } else {
             $package->pkgdb[0]->tagData = "no";
         }
         if ($package->db[0]->tagData == 'yes') {
             $package->db[0]->tagData = "<font color='green'><strong>" . ui_language::translate("YES") . "</strong></font>";
         } else {
             $package->db[0]->tagData = "<font color='red'><strong>" . ui_language::translate("NO") . "</strong></font>";
         }
         // END - Info and DB tags by tgates
         $toReturn .= "<tr>\n\t\t\t<td>" . $package->name[0]->tagData . "</td>\n\t\t\t<td>" . $package->version[0]->tagData . "</td>\n\t\t\t<td>" . $package->type[0]->tagData . "</td>\n\t\t\t<td>" . $package->info[0]->tagData . "</td>\n\t\t\t<td><center>" . $package->db[0]->tagData . "</center></td>\n\t\t\t<td>\n\t\t\t\t<form id=\"install\" name=\"Install\" action=\"/?module=sentastico\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"startinstall\" value=\"true\"> \n\t\t\t\t<input type=\"hidden\" name=\"pkgzip\" value=" . $package->zipname[0]->tagData . "> \n\t\t\t\t<input type=\"hidden\" name=\"pkg\" value='" . $package->name[0]->tagData . "'> \n\t\t\t\t<input type=\"hidden\" name=\"pkgdb\" value=" . $package->pkgdb[0]->tagData . "> \n\t\t\t\t<input class=\"btn btn-primary btn-small\" type=\"submit\" name=\"doInstall\" value=" . ui_language::translate("Install") . " />\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t</tr>";
     }
     return $toReturn;
 }
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$blank)) {
         return ui_sysmessage::shout(ui_language::translate("Your Domain can not be empty. Please enter a valid Domain Name and try again."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badname)) {
         return ui_sysmessage::shout(ui_language::translate("Your Domain name is not valid. Please enter a valid Domain Name: i.e. 'domain.com'"), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("The domain already appears to exist on this server."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$nosub)) {
         return ui_sysmessage::shout(ui_language::translate("You cannot add a Sub-Domain here. Please use the Subdomain manager to add Sub-Domains."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$error)) {
         return ui_sysmessage::shout(ui_language::translate("Please remove 'www'. The 'www' will automatically work with all Domains / Subdomains."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$writeerror)) {
         return ui_sysmessage::shout(ui_language::translate("There was a problem writting to the virtual host container file. Please contact your administrator and report this error. Your domain will not function until this error is corrected."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your domain web hosting has been saved successfully."), "zannounceok");
     }
     return;
 }
Beispiel #8
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$error)) {
         if (self::$error == "ok") {
             return ui_sysmessage::shout(ui_language::translate("Your account password been changed successfully!"), "zannounceok");
         }
         if (self::$error == "nomatch") {
             return ui_sysmessage::shout(ui_language::translate("Sorry, your current password does not match the one on your account!"), "zannounceerror");
         }
         if (self::$error == "error") {
             return ui_sysmessage::shout(ui_language::translate("An error occured and your MADmin account password could not be updated. Please ensure you entered all passwords correctly and try again."), "zannounceerror");
         }
     } else {
         if (!fs_director::CheckForEmptyValue(self::$badpassword)) {
             return ui_sysmessage::shout(ui_language::translate("Your password did not meet the minimun length requirements. Characters needed for password length") . ": " . ctrl_options::GetSystemOption('password_minlength'), "zannounceerror");
         }
         return;
     }
 }
Beispiel #9
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$error)) {
         return ui_sysmessage::shout(ui_language::translate("You need to enter a question and an answer to add a FAQ item!"), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$delete)) {
         return ui_sysmessage::shout(ui_language::translate("FAQ item was deleted successfully!"), "zannounceok");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("FAQ item was added successfully!"), "zannounceok");
     }
     return;
 }
 static function getModuleDesc()
 {
     $module_desc = ui_language::translate(ui_module::GetModuleDescription());
     return $module_desc;
 }
Beispiel #11
0
 static function GroupMoveTo($uid, $gid)
 {
     global $zdbh;
     $sql = "SELECT * FROM x_groups WHERE ug_reseller_fk=:uid AND ug_id_pk <> :gid";
     //$numrows = $zdbh->query($sql);
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':uid', $uid);
     $numrows->bindParam(':gid', $gid);
     $numrows->execute();
     if ($numrows->fetchColumn() != 0) {
         $sql = $zdbh->prepare($sql);
         $sql->bindParam(':uid', $uid);
         $sql->bindParam(':gid', $gid);
         $res = array();
         $sql->execute();
         while ($rowgroups = $sql->fetch()) {
             array_push($res, array('groupid' => $rowgroups['ug_id_pk'], 'groupname' => ui_language::translate(runtime_xss::xssClean($rowgroups['ug_name_vc'])), 'groupdesc' => ui_language::translate(runtime_xss::xssClean($rowgroups['ug_notes_tx']))));
         }
         return $res;
     } else {
         return false;
     }
 }
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$blank)) {
         return ui_sysmessage::shout(ui_language::translate("You need to specify a user name and select a database to create your MySQL user."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$rootabuse)) {
         return ui_sysmessage::shout(ui_language::translate("You cannot create a user named 'root'! This attempt has been logged and the system administrator notified!."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("A MySQL username with that name already appears to exsist."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badname)) {
         return ui_sysmessage::shout(ui_language::translate("Your MySQL user name is not valid. Please enter a valid MySQL user name."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badpass)) {
         return ui_sysmessage::shout(ui_language::translate("Your MySQL password is not valid. Valid characters are A-Z, a-z, 0-9."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badIP)) {
         return ui_sysmessage::shout(ui_language::translate("The IP address is not valid. Please enter a valid IP address."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$dbalreadyadded)) {
         return ui_sysmessage::shout(ui_language::translate("That database has already been added to this user."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your MySQL users have been saved successfully!"), "zannounceok");
     }
     return;
 }
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$alreadyexistssame)) {
         return ui_sysmessage::shout(ui_language::translate("You cannot forward a mailbox to itself!"), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate('A mailbox, alias, forwarder or distribution list already exists with that name.'), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$validemail)) {
         return ui_sysmessage::shout(ui_language::translate("Your email address is not valid."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$password)) {
         return ui_sysmessage::shout(ui_language::translate("Your password cannot be blank."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$noaddress)) {
         return ui_sysmessage::shout(ui_language::translate("Your email address cannot be blank."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your forwarders have been saved successfully!"), "zannounceok");
     } else {
         return NULL;
     }
     return;
 }
 static function getCustomPackageSelection()
 {
     global $controller;
     $toReturn = "";
     if (file_exists("./modules/" . $controller->GetControllerRequest('URL', 'module') . "/packages/custom_packages.xml")) {
         $packages = new xml_reader(fs_filehandler::ReadFileContents("./modules/" . $controller->GetControllerRequest('URL', 'module') . "/packages/custom_packages.xml"));
         $packages->Parse();
         foreach ($packages->document->package as $package) {
             // START - Info and DB tags by tgates
             if ($package->db[0]->tagData == 'yes') {
                 $package->pkgdb[0]->tagData = "yes";
             } else {
                 $package->pkgdb[0]->tagData = "no";
             }
             if ($package->db[0]->tagData == 'yes') {
                 $package->db[0]->tagData = "<font color='green'><strong>" . ui_language::translate("YES") . "</strong></font>";
             } else {
                 $package->db[0]->tagData = "<font color='red'><strong>" . ui_language::translate("NO") . "</strong></font>";
             }
             // END - Info and DB tags by tgates
             $toReturn .= "<tr>\n\t\t\t<td>" . $package->name[0]->tagData . "</td>\n\t\t\t<td>" . $package->version[0]->tagData . "</td>\n\t\t\t<td>" . $package->type[0]->tagData . "</td>\n\t\t\t<td>" . $package->info[0]->tagData . "</td>\n\t\t\t<td><center>" . $package->db[0]->tagData . "</center></td>\n\t\t\t<td>\n\t\t\t\t<form id=\"install\" name=\"Install\" action=\"/?module=sentastico\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"startinstall\" value=\"true\"> \n\t\t\t\t<input type=\"hidden\" name=\"pkgzip\" value=" . $package->zipname[0]->tagData . "> \n\t\t\t\t<input type=\"hidden\" name=\"pkg\" value='" . $package->name[0]->tagData . "'> \n\t\t\t\t<input type=\"hidden\" name=\"pkgdb\" value=" . $package->pkgdb[0]->tagData . "> \n\t\t\t\t<input class=\"btn btn-primary btn-small\" type=\"submit\" name=\"doInstall\" value=" . ui_language::translate("Install") . " />\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t</tr>";
         }
         $toReturn .= "</table><br />";
     } else {
         $toReturn .= "</table><br />";
     }
     //$toReturn .= "</form>";
     return $toReturn;
 }
Beispiel #15
0
 static function getLaunchWebMail()
 {
     $message = ui_language::translate("Launch Webmail");
     return $message;
 }
Beispiel #16
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$blank)) {
         return ui_sysmessage::shout(ui_language::translate("You must fill out all fields!"), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$emailerror)) {
         return ui_sysmessage::shout(ui_language::translate("Your email address is not valid!"), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your account settings have been saved successfully!"), "zannounceok");
     }
     return;
 }
Beispiel #17
0
 static function DefaultEmailBody()
 {
     $line = ui_language::translate("Hi {{fullname}},\r\rWe are pleased to inform you that your new hosting account is now active, you can now login to ZPanel using the following credentials:\r\rUsername: {{username}}\rPassword: {{password}}");
     return $line;
 }
Beispiel #18
0
 private static function DisplayChart($name, $used, $maximum)
 {
     if ($maximum < 0) {
         //-1 = unlimited
         $res = '<img src="' . ui_tpl_assetfolderpath::Template() . 'images/unlimited.png" alt="' . ui_language::translate('Unlimited') . '"/>';
     } else {
         $free = max($maximum - $used, 0);
         $res = '<img src="etc/lib/pChart2/zpanel/z3DPie.php?score=' . $free . '::' . $used . '&amp;imagesize=240::190&amp;chartsize=120::90&amp;radius=100' . '&amp;labels=Free: ' . $free . '::Used: ' . $used . '&amp;legendfont=verdana&amp;legendfontsize=8&amp;legendsize=10::160"' . ' alt="' . ui_language::translate('Pie chart') . '"/>';
     }
     return '<h2>' . ui_language::translate($name) . '</h2>' . $res;
 }
Beispiel #19
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$notmine)) {
         return ui_sysmessage::shout(ui_language::translate("Unable to get log preview, this domain does not belong to you."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$notfile)) {
         return ui_sysmessage::shout(ui_language::translate("The log does not exit yet."), "zannounceerror");
     }
     return;
 }
Beispiel #20
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$userblank)) {
         return ui_sysmessage::shout(ui_language::translate("You need to specify a username to create a new client."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$emailblank)) {
         return ui_sysmessage::shout(ui_language::translate("You need to specify an email address to create a new client."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$passwordblank)) {
         return ui_sysmessage::shout(ui_language::translate("Your password cannot be blank."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$packageblank)) {
         return ui_sysmessage::shout(ui_language::translate("You must select a package for your new client."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$groupblank)) {
         return ui_sysmessage::shout(ui_language::translate("You must select a user group for your new client."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badname)) {
         return ui_sysmessage::shout(ui_language::translate("Your client name is not valid. Please enter a valid client name."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$bademail)) {
         return ui_sysmessage::shout(ui_language::translate("Your email adress is not valid. Please enter a valid email address."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badpassword)) {
         return ui_sysmessage::shout(ui_language::translate("Your password did not meet the minimun length requirements. Characters needed for password length") . ": " . ctrl_options::GetSystemOption('password_minlength'), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("A client with that name already appears to exsist on this server."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your client(s) have been saved successfully!"), "zannounceok");
     }
     if (!fs_director::CheckForEmptyValue(self::$not_unique_email)) {
         return ui_sysmessage::shout(ui_language::translate("Another user account is already using this email address."), "zannounceerror");
     }
     return;
 }
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$blank)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Error:</strong> You need to specify a valid location for your script."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$noexists)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Error:</strong> Your script does not appear to exist at that location."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$cronnoexists)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Error:</strong> System Cron file could not be created."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$cronnowrite)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Error:</strong> Could not write to the System Cron file."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Error:</strong> You can not add the same cron task more than once."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$error)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Error:</strong> There was an error updating the cron job."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("<strong>Success:</strong> Cron updated successfully."), "zannounceok");
     }
     return;
 }
 static function CheckLogWritable($filename)
 {
     if (is_readable($filename)) {
         if (is_writable($filename)) {
             $retval = "<font color=\"green\">" . ui_language::translate("(writable)") . "</font>";
         } else {
             $retval = "<font color=\"red\">" . ui_language::translate("(readonly)") . "</font>";
         }
     } else {
         $retval = NULL;
     }
     return $retval;
 }
Beispiel #23
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your settings have been saved successfully!"));
     }
     return;
 }
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$blank)) {
         return ui_sysmessage::shout(ui_language::translate("You need to specify a database name to create your database."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badname)) {
         return ui_sysmessage::shout(ui_language::translate("Your MySQL database name is not valid. Please enter a valid MySQL database name."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("A database with that name already appears to exsist."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your databases have been saved successfully!"), "zannounceok");
     }
     return;
 }
Beispiel #25
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$blank)) {
         return ui_sysmessage::shout(ui_language::translate("You must enter a valid username and password to create your FTP account."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("An FTP account with that name already exists."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$error)) {
         return ui_sysmessage::shout(ui_language::translate("There was an error updating your FTP accounts."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$badname)) {
         return ui_sysmessage::shout(ui_language::translate("Your ftp account name is not valid. Please enter a valid ftp account name."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$invalidPath)) {
         return ui_sysmessage::shout(ui_language::translate("Invalid Folder."), "zannounceok");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("FTP accounts updated successfully."), "zannounceok");
     }
     return;
 }
 static function getResult()
 {
     global $controller;
     $currentuser = ctrl_users::GetUserDetail();
     $urlvars = $controller->GetAllControllerRequests('URL');
     if (isset($urlvars['saved'])) {
         return ui_sysmessage::shout(ui_language::translate("Your theme configuration has been saved and has been updated for all clients!"), "zannounceok");
     }
     if (isset($urlvars['selectcss'])) {
         return ui_sysmessage::shout(ui_language::translate("This theme has more than one variation, please choose a variation you'd like to use.."), "zannounceerror");
     }
     return false;
 }
Beispiel #27
0
 private static function DisplayChart($name, $used, $maximum)
 {
     global $controller;
     if ($maximum < 0) {
         //-1 = unlimited
         if (file_exists(ui_tpl_assetfolderpath::Template() . 'img/misc/unlimited.png')) {
             $res = '<img src="' . ui_tpl_assetfolderpath::Template() . 'img/misc/unlimited.png" alt="' . ui_language::translate('Unlimited') . '"/>';
         } else {
             $res = '<img src="modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/unlimited.png" alt="' . ui_language::translate('Unlimited') . '"/>';
         }
     } else {
         $free = max($maximum - $used, 0);
         $res = '<img src="etc/lib/pChart2/MADmin/z3DPie.php?score=' . $free . '::' . $used . '&amp;imagesize=240::190&amp;chartsize=120::90&amp;radius=100' . '&amp;labels=Free: ' . $free . '::Used: ' . $used . '&amp;legendfont=verdana&amp;legendfontsize=8&amp;legendsize=10::160"' . ' alt="' . ui_language::translate('Pie chart') . '"/>';
     }
     return '<h2>' . ui_language::translate($name) . '</h2>' . $res;
 }
Beispiel #28
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
         return ui_sysmessage::shout(ui_language::translate("A mailbox, alias, forwarder or distrubution list already exists with that name."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$validemail)) {
         return ui_sysmessage::shout(ui_language::translate("Your email address is not valid."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$noaddress)) {
         return ui_sysmessage::shout(ui_language::translate("Your email address cannot be blank."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$validdomain)) {
         return ui_sysmessage::shout(ui_language::translate("The selected domain was not valid or not yet active."), "zannounceerror");
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your aliases have been saved successfully!"), "zannounceok");
     } else {
         return NULL;
     }
     return;
 }
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$ResultOk)) {
         return ui_sysmessage::shout(ui_language::translate(self::$ResultOk), 'zannouncesuccess', 'SUCCESS DNS SAVED');
     } elseif (!fs_director::CheckForEmptyValue(self::$ResultErr)) {
         return ui_sysmessage::shout(ui_language::translate(self::$ResultErr), 'zannounceerror', 'ERROR DNS NOT SAVED');
     }
     return;
 }
Beispiel #30
0
 static function getResult()
 {
     if (!fs_director::CheckForEmptyValue(self::$error_message)) {
         return ui_sysmessage::shout(ui_language::translate(self::$error_message), 'zannounceerror', 'zannounce');
     }
     if (!fs_director::CheckForEmptyValue(self::$ok)) {
         return ui_sysmessage::shout(ui_language::translate("Changes to your module options have been saved successfully!"));
     } else {
         return ui_language::translate(ui_module::GetModuleDescription());
     }
     return;
 }