$aInt = new WHMCS_Admin("Browser"); $aInt->title = $aInt->lang("utilities", "browser"); $aInt->sidebar = "browser"; $aInt->icon = "browser"; if ($action == "delete") { check_token("WHMCS.admin.default"); delete_query("tblbrowserlinks", array("id" => $id)); redir(); } if ($action == "add") { check_token("WHMCS.admin.default"); insert_query("tblbrowserlinks", array("name" => $sitename, "url" => $siteurl)); redir(); } //$url = "http://www.whmcs.com/"; $url = "http://www.google.com/"; // change to whatever you want $link = $whmcs->get_req_var("link"); $result = select_query("tblbrowserlinks", "", "", "name", "ASC"); while ($data = mysql_fetch_array($result)) { $browserlinks[] = $data; if ($data['id'] == $link) { $url = $data['url']; } } $aInt->assign("browserlinks", $browserlinks); $content = "<iframe width=\"100%\" height=\"580\" src=\"" . $url . "\" name=\"brwsrwnd\" style=\"min-width:1000px;\"></iframe>"; $aInt->deleteJSConfirm("doDelete", "browser", "deleteq", "?action=delete&id="); $aInt->content = $content; $aInt->jscode = $jscode; $aInt->display();
} } if (count($_ADDONLANG)) { $modulevars['_lang'] = $_ADDONLANG; } if ($modulevars['version'] != $configarray['version']) { if (function_exists($module . "_upgrade")) { call_user_func($module . "_upgrade", $modulevars); } update_query("tbladdonmodules", array("value" => $configarray['version']), array("module" => $module, "setting" => "version")); } $sidebar = ""; if (function_exists($module . "_sidebar")) { $sidebar = call_user_func($module . "_sidebar", $modulevars); } $aInt->assign("addon_module_sidebar", $sidebar); if (function_exists($module . "_output")) { call_user_func($module . "_output", $modulevars); } else { echo "<p>" . $aInt->lang("addonmodules", "nooutput") . "</p>"; } } else { echo "<br /><br />\n<p align=\"center\"><b>" . $aInt->lang("permissions", "accessdenied") . "</b></p>\n<p align=\"center\">" . $aInt->lang("addonmodules", "noaccess") . "</p>\n<p align=\"center\">" . $aInt->lang("addonmodules", "howtogrant") . "</p>"; } } else { echo "<p>" . $aInt->lang("addonmodules", "error") . "</p>"; } } else { $pagetitle = str_replace("_", " ", $module); $pagetitle = titleCase($pagetitle); echo "<h2>" . $pagetitle . "</h2>";
} else { $text_reports = $graph_reports = array(); $dh = opendir("../modules/reports/"); while (false !== ($file = readdir($dh))) { if ($file != "index.php" && is_file("../modules/reports/" . $file)) { $file = str_replace(".php", "", $file); if (substr($file, 0, 5) != "graph") { $nicename = str_replace("_", " ", $file); $nicename = titleCase($nicename); $text_reports[$file] = $nicename; } } } closedir($dh); asort($text_reports); $aInt->assign("text_reports", $text_reports); $aInt->assign("graph_reports", $graph_reports); ob_start(); } if ($report) { $currencies = array(); $result = select_query("tblcurrencies", "", "", "code", "ASC"); while ($data = mysql_fetch_array($result)) { $id = $data['id']; $code = $data['code']; $currencies[$id] = $code; if (!$currencyid && $data['default']) { $currencyid = $id; } if ($data['default']) { $defaultcurrencyid = $id;