static function doUpdate($list) { $cmd = self::getYumCommand(); $file = fix_nname_to_be_variable($cmd); $file = "__path_program_root/cache/{$file}"; lxshell_return("yum", "-y", "install", implode(" ", $list)); lunlink($file); }
static function doUpdate($list) { $cmd = self::getYumCommand(); $file = fix_nname_to_be_variable(implode(" ", $cmd)); $file = "__path_program_root/cache/{$file}"; $plist = implode(" ", $list); while (true) { system("up2date --nox --install --nosig {$plist}", $return_value); if (!$return_value) { break; } dprint("Got error from up2date...\n"); } lunlink($file); }
static function getListVersion($syncserver, $list) { $list[]['componentname'] = 'mysql'; $list[]['componentname'] = 'perl'; //$list[]['componentname'] = 'postgresql'; $list[]['componentname'] = 'httpd'; $list[]['componentname'] = 'qmail'; $list[]['componentname'] = 'courier-imap-toaster'; $list[]['componentname'] = 'php'; $list[]['componentname'] = 'lighttpd'; $list[]['componentname'] = 'djbdns'; $list[]['componentname'] = 'bind'; $list[]['componentname'] = 'spamassassin'; $list[]['componentname'] = 'pure-ftpd'; foreach ($list as $l) { $nlist[] = $l['componentname']; } $complist = implode(" ", $nlist); $file = fix_nname_to_be_variable("rpm -q {$complist}"); $file = "__path_program_root/cache/{$file}"; $cmdlist = lx_array_merge(array(array("rpm", "-q"), $nlist)); $val = get_with_cache($file, $cmdlist); $res = explode("\n", $val); $ret = null; foreach ($list as $k => $l) { $name = $list[$k]['componentname']; $sing['nname'] = $name . "___" . $syncserver; $sing['componentname'] = $name; $sing['version'] = self::getVersion($res, $name); $status = strstr($sing['version'], "not installed"); $sing['status'] = $status ? 'off' : 'on'; /* if (isOn($sing['status'])) { $sing['full_version'] = `rpm -qi $name`; } else { $sing['full_version'] = $sing['version']; } */ $ret[] = $sing; } return $ret; }
function syncSpamUserPref() { global $gbl, $sgbl, $ghtml; // The parent can be either a domain or a user. CHeck for the @ sign. if (csa($this->main->nname, "@")) { list($user, $domain) = explode("@", $this->main->nname); } else { $domain = $this->main->nname; $user = null; } $sysuser = mmail__qmail::getUserGroup($domain); // --- issue #578/#721 - missing in version 6.1.6 // $mailpath = "/home/lxadmin/mail"; $mailpath = mmail__qmail::getDir($domain); if ($user) { // $prefpath = "$mailpath/domains/{$domain}/{$user}/.bogopref.cf"; $prefpath = "{$mailpath}/{$user}/.bogopref.cf"; } else { return; } $prefdir = dirname($prefpath); if (!lxfile_exists(dirname($prefpath))) { lxuser_mkdir($sysuser, dirname($prefpath)); } $wname = fix_nname_to_be_variable($this->main->nname); $fdata = null; $cutoff = $this->main->spam_hit / 10 + 0.2; $fdata .= "spam_cutoff {$cutoff}\n"; $fdata .= "spam_subject_tag={$this->main->subject_tag}\n"; $fdata .= "wordlist R,user,{$wname}.wordlist.db,1\n"; $fdata .= "wordlist R,system,wordlist.db,2\n"; $fdata .= "wordlist R,system,kloxo.wordlist.db,3\n"; lxuser_put_contents($sysuser, $prefpath, $fdata); if (!lxfile_real("/var/bogofilter/{$wname}.wordlist.db")) { new_process_cmd($sysuser, null, "bogofilter -d /var/bogofilter/ --wordlist=R,user,{$wname}.wordlist.db,1 -n < /etc/my.cnf"); } lxfile_touch("/var/bogofilter/wordlist.db"); // Using generic because spamassasin is used on windows too. Or at least can be used. //lxfile_generic_chown("/var/bogofilter", mmail__qmail::getUserGroup($domain)); }
function do_resource($tree, $object, $depth, $alistflag, $func, $complex = true, $showurlflag = true) { global $gbl, $sgbl, $login, $ghtml; static $scriptdone; if (!$scriptdone && $complex) { print "<link href=/htmllib/js/tree/dtree.css rel=stylesheet type=text/css>\n"; $ghtml->print_jscript_source("/htmllib/js/tree/dtree.js"); $scriptdone = true; } $treename = "_" . fix_nname_to_be_variable($object->nname); ?> <table width=90% cellpadding=0 cellspacing=0 valign=top> <tr> <td valign=top align=left> <?php if ($complex) { print "<div class='dtree'>"; print "<script>"; print "{$treename} = new dTree('{$treename}');"; print "</script>"; } $val = -1; if (!$tree) { $tree = $this->print_resource(null, $object, $ghtml->frm_o_o, $object, $depth, $alistflag, $func, false, $showurlflag); } if ($complex) { print "<script>"; if (isset($gbl->__tmp_checkbox_value)) { print "var __treecheckboxcount = {$gbl->__tmp_checkbox_value};"; } } $total = -1; print_time('tree'); $this->print_tree($treename, $tree, $total, $val, $complex); if ($complex) { print "document.write({$treename});"; print "</script>"; print "</div>"; } print_time('tree', "Tree", 2); ?> </td> </tr> </table> <form name=__treeForm id=__treeForm method=<?php echo "get"; ?> action="/display.php"> <input type=hidden name=frm_accountselect value=""> <?php $this->print_current_input_vars(array('frm_action', 'frm_subaction')); if (cse($ghtml->frm_subaction, "confirm_confirm")) { $this->print_input("hidden", "frm_action", "update"); $sub = $this->frm_subaction; $actionimg = "finish.gif"; } else { $this->print_input("hidden", "frm_action", "updateform"); $sub = $this->frm_subaction . "_confirm"; $actionimg = "next.gif"; } $this->print_input("hidden", "frm_subaction", "{$sub}"); if (isset($gbl->__tmp_checkbox_value)) { print "<a href=javascript:treeStoreValue()> <img src=/img/general/button/{$actionimg}> </a>"; } print "</form>"; }
static function getSslCertnameFromIP($ipname) { return fix_nname_to_be_variable($ipname); }
function fix_mysql_root_password($server) { global $gbl, $sgbl, $login, $ghtml; $pass = $login->password; $pass = fix_nname_to_be_variable($pass); $pass = substr($pass, 3, 11); $dbadmin = new Dbadmin(null, $server, "mysql___{$server}"); $dbadmin->get(); if ($dbadmin->dbaction === 'add') { $dbadmin->syncserver = $server; $dbadmin->ttype = 'mysql'; $dbadmin->dbtype = 'mysql'; $dbadmin->dbadmin_name = 'root'; $dbadmin->parent_clname = createParentName("pserver", $server); $dbadmin->write(); $dbadmin->get(); $dbadmin->dbaction = 'clean'; } if ($dbadmin->dbpassword) { dprint("Mysql Password is not null\n"); return; } $dbadmin->dbpassword = $pass; $dbadmin->setUpdateSubaction('update'); try { $dbadmin->was(); } catch (exception $e) { } }
static function add($parent, $class, $param) { if (!($parent->isClass('pserver') || $parent->priv->isOn('cron_minute_flag'))) { if (!is_numeric($param['minute'])) { $param['minute'] = 0; } } $param['username'] = $parent->username; /* if ($parent->is__table('pserver')) { $param['syncserver'] = $parent->nname; } else { $param['syncserver'] = $parent->syncserver; } */ $parambase = implode("_", array($param['username'], $param['command'])); $parambase = fix_nname_to_be_variable($parambase); $cronlist = $parent->getList('cron'); $count = 0; while (isset($cronlist[$parambase . "_" . $count])) { $count++; } $param['nname'] = $parambase . "_" . $count; return $param; }
function set_class_variable($class, $var, $val) { $var = fix_nname_to_be_variable($var); $class = ucfirst($class); $variable = "{$class}::\$" . $var; return eval(" {$variable} = \$val ; "); }
function __ac_desc_resource($object) { global $gbl, $sgbl, $login, $ghtml; $sgbl->__var_main_resource = true; $treename = fix_nname_to_be_variable($object->nname); ?> <!-- Resource Description --> <table valign="top"> <tr align="left"> <td width="10"> <input class="submitbutton" onClick='<?php echo $treename; ?> .closeAll();' type="button" value="Close"> </td> <td align="left" width="10"> <input class="submitbutton" onClick='<?php echo $treename; ?> .openAll();' type="button" value="Open"> </td> <td width="100%"> </td> </tr> </table> <?php $ghtml->do_full_resource($object, 0, false); }
function getFilterVariableForThis($class) { $filtervar = "__filtervar_{$class}"; if (isset($this->{$filtervar})) { return $this->{$filtervar}; } $name = fix_nname_to_be_variable($this->nname); $id = "{$this->get__table()}_{$name}__{$class}"; $this->{$filtervar} = $id; return $id; }
static function add($parent, $class, $param) { if (!($parent->isClass('pserver') || $parent->priv->isOn('cron_minute_flag'))) { if (!is_numeric($param['minute'])) { $param['minute'] = 0; } } $param['username'] = $parent->username; /* if ($parent->is__table('pserver')) { $param['syncserver'] = $parent->nname; } else { $param['syncserver'] = $parent->syncserver; } */ $parambase = implode("_", array($param['username'], $param['command'])); if (!$parent->priv->isOn('cron_shell_flag')) { if (!(substr($param['command'], 0, 5) === "wget ") && !(substr($param['command'], 0, 4) === "php ")) { throw new lxException("command_not_allowd", '', ''); } } $parambase = fix_nname_to_be_variable($parambase); $cronlist = $parent->getList('cron'); $count = 0; while (isset($cronlist[$parambase . "_" . $count])) { $count++; } $param['nname'] = $parambase . "_" . $count; return $param; }
function __ac_desc_resource($object) { global $gbl, $sgbl, $login, $ghtml; $sgbl->__var_main_resource = true; $treename = fix_nname_to_be_variable($object->nname); ?> <table valign=top > <tr align=left><td width=10><input class=submitbutton onClick='<?php echo $treename; ?> .closeAll();' type=button value="Close"></td> <td align=left width=10> <input class=submitbutton onClick='<?php echo $treename; ?> .openAll();' type=button value="Open"> </td> <td width=100%> </td> </tr></table> <?php $ghtml->do_full_resource($object, 0, false); }
function updateform($subaction, $param) { global $gbl, $sgbl, $login, $ghtml; $progname = $sgbl->__var_program_name; $parent = $this->getParentO(); $tree = createTreeObject('name', null, null, null, null, null, null); $gbl->__var_restore_tree = $tree; if ($this->rm_username) { $this->rm_username = fix_meta_character($this->rm_username); } switch ($subaction) { case "backup": if (trim($this->ftp_server)) { $vlist['ftp_server'] = array('M', null); $vlist['rm_username'] = array('M', null); $vlist['rm_password'] = array('M', '***'); $vlist['upload_to_ftp'] = array('M', null); } else { $vlist['upload_to_ftp'] = array('M', "Ftp Server Not Set"); } if (!$this->getParentO()->checkIfLockedForAction('backup')) { if ($this->backupstage === 'doing') { $this->backupstage = 'program_interrupted'; } } $this->backupstage = fix_nname_to_be_variable($this->backupstage); $vlist['backupstage'] = array('M', null); $vlist['backup_to_file_f'] = null; $parent->backupExtraVar($vlist); $vlist['__v_button'] = 'Backup Now'; return $vlist; case "restore_confirm": $gbl->__var_tmp_disabled_flag = false; if ($param) { $this->backupcheckForConsistency($tree, $param); } $vlist['__v_childheir'] = '__var_backup'; $vlist['__v_showcheckboxflag'] = true; if ($sgbl->isDebug()) { $vlist['__v_resourcefunc'] = "getBackupChildList"; } else { $vlist['__v_resourcefunc'] = "getDisplayBackupChildList"; } $vlist['__v_param'] = $param; $vlist['__v_button'] = 'Restore Now'; print_time("restore_process", "Restore Processing Took"); return $vlist; case "restore_confirm_confirm": $gbl->__var_tmp_disabled_flag = true; print_time("restore_process"); if ($param) { $this->backupcheckForConsistency($tree, $param); } $vlist['__v_childheir'] = '__var_backup'; if ($sgbl->isDebug()) { $vlist['__v_resourcefunc'] = "getBackupChildList"; } else { $vlist['__v_resourcefunc'] = "getDisplayBackupChildList"; } $vlist['__v_showcheckboxflag'] = true; $vlist['__v_param'] = $param; $vlist['__v_button'] = 'Restore Now'; print_time("restore_process", "Restore Processing Took"); return $vlist; case "schedule_conf": if ($parent->isSimpleBackup()) { $sched = array('disabled', 'weekly', 'monthly'); } else { $sched = array('disabled', 'daily', 'weekly', 'monthly'); } if (!$this->backupschedule_type) { $this->backupschedule_type = 'disabled'; } if ($this->priv->isOn('backupschedule_flag')) { $vlist['backupschedule_type'] = array('s', $sched); } else { $vlist['backupschedule_type'] = array('M', 'Disabled'); } $vlist['rm_last_number'] = null; $vlist['__v_updateall_button'] = array(); break; case "ftp_conf": $vlist['ftp_server'] = null; $vlist['rm_username'] = null; $vlist['rm_password'] = array('m', get_star_password()); $vlist['rm_directory'] = null; $vlist['upload_to_ftp'] = null; $vlist['upload_type'] = array('M', 'ftp'); $vlist['no_local_copy_flag'] = null; $vlist['dont_verify_ftp_f'] = null; $vlist['__v_updateall_button'] = array(); break; case "restore_from_ftp": if (!$this->ftp_server) { $vlist['ftp_server'] = array("M", "Ftp Server is Not Set"); break; } $vlist['ftp_server'] = array('M', null); $vlist['rm_username'] = array('M', null); $vlist['rm_password'] = array('M', "****"); $vlist['backup_ftp_file_f'] = null; $vlist['__v_next'] = 'restore_confirm'; $vlist['__v_button'] = 'Continue'; break; case "restore_from_file": if (!$this->getParentO()->checkIfLockedForAction('restore')) { if ($this->restorestage === 'doing') { $this->restorestage = 'program_interrupted'; } } $vlist['restorestage'] = array('M', null); $vlist['backup_from_file_f'] = array('L', "/"); $vlist['__v_next'] = 'restore_confirm'; $vlist['__v_button'] = 'Start Restore Process'; break; } return $vlist; }
function printSelectObjectTable($name_list, $parent, $class, $blist = array(), $display = null) { global $gbl, $sgbl, $login, $ghtml; print_time("{$class}.objecttable"); if ($this->frm_accountselect !== null) { $sellist = explode(',', $this->frm_accountselect); } else { $sellist = null; } $classdesc = $this->get_class_description($class, $display); $unique_name = trim($parent->nname) . trim($class) . trim($display) . trim($classdesc[2]); $unique_name = fix_nname_to_be_variable($unique_name); $filtername = $parent->getFilterVariableForThis($class); $fil = $this->frm_hpfilter; $sortdir = null; $sortby = null; if (isset($fil[$filtername]['sortby'])) { $sortby = $fil[$filtername]['sortby']; } if (isset($fil[$filtername]['sortdir'])) { $sortdir = $fil[$filtername]['sortdir']; } $pagesize = '99999'; $iconpath = get_image_path() . "/button"; $nlcount = count($name_list) + 1; $imgheadleft = $login->getSkinDir() . "/top_lt.gif"; $imgheadleft2 = $login->getSkinDir() . "/top_lt.gif"; $imgheadright = $login->getSkinDir() . "/top_rt.gif"; $imgheadbg = $login->getSkinDir() . "/top_bg.gif"; $imgbtnbg = $login->getSkinDir() . "/btn_bg.gif"; $imgtablerowhead = $login->getSkinDir() . "/tablerow_head.gif"; $imgtablerowheadselect = $login->getSkinDir() . "/top_line_medium.gif"; $imgbtncrv = $login->getSkinDir() . "/btn_crv.gif"; $imgtopline = $login->getSkinDir() . "/top_line.gif"; $classdesc = $this->get_class_description($class); $unique_name = trim($parent->nname) . trim($class) . trim($classdesc[2]); $unique_name = fix_nname_to_be_variable($unique_name); //dprint("-- ".$unique_name. " --", 2); ?> <br /> <script> var ckcount<?php echo $unique_name; ?> ; </script> <?php $tsortby = $sortby; if (!$sortby) { $tsortby = exec_class_method($class, "defaultSort"); } if (!$sortdir) { $sortdir = exec_class_method($class, "defaultSortDir"); } //print_time("objecttable"); $obj_list = $parent->getVirtualList($class, $total_num, $tsortby, $sortdir); //print_time("objecttable", 'objecttable'); if (!$sellist) { //$total_num = $this->display_count($obj_list, $display) ; } ?> <table width=100%> <tr> <td align=center> <table cellspacing=2 cellpadding=2 width=97% align=center> <tr><td class=rowpoint></td><td colspan= <?php echo $nlcount; ?> > <table cellpadding=0 cellspacing=0 border=0 width=100%> <tr><td valign=bottom ></td> <td> <?php if (isset($ghtml->__http_vars['frm_hpfilter'][$filtername]['pagenum'])) { $cgi_pagenum = $ghtml->__http_vars['frm_hpfilter'][$filtername]['pagenum']; } else { $cgi_pagenum = 1; } if (!$sellist) { $this->print_next_previous($parent, $class, "top", $cgi_pagenum, $total_num, $pagesize); } ?> </td> <td align=right valign=bottom > <?php if (!$sellist) { ?> <table cellpadding="0" cellspacing="0" border="0" height="27" > <tr><td><img src="<?php echo $imgheadleft; ?> "></td><td nowrap valign=middle background="<?php echo $imgheadbg; ?> "><b><font color="#ffffff"><?php echo get_plural($classdesc[2]); ?> under <?php echo $parent->display("nname"); ?> </b> <?php echo $this->print_machine($parent); ?> <b> (<?php echo $total_num; ?> )</b></font></td><td><img src="<?php echo $imgheadright; ?> "></td></tr> </table> </td> </tr> <tr><td colspan=3><table cellpadding=0 cellspacing=0 border=0 width=100% height=35 background="<?php echo $imgbtnbg; ?> "> <tr><td><img src="<?php echo $imgbtncrv; ?> "></td><td width=80% align=left > <table width=100% cellpadding=0 cellspacing=0 border=0><tr><td valign=bottom><?php $this->print_list_submit($class, $blist, $unique_name); ?> </td></tr></table></td><td width=15% align=right><b><font color="#ffffff"><?php $this->print_search($parent, $class); ?> </font></b></td></tr> </table> </td></tr> </td></tr><tr><td height=2 colspan=2></td></tr></table> <?php } else { $descr = $this->getActionDescr($_SERVER['PHP_SELF'], $this->__http_vars, $class, $var, $identity); ?> <table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td width=70% valign=bottom><table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td width=100% height=2 background="<?php echo $imgtopline; ?> "></td></tr></table></td><td align=right><table cellpadding=0 cellspacing=0 border=0 width=100% ><tr><td><img src="<?php echo $imgheadleft; ?> "></td><td nowrap width=100% background="<?php echo $imgheadbg; ?> " ><b><font color="#ffffff"> Confirm <?php echo $descr[1]; ?> : </b><?php echo get_plural($classdesc[2]); ?> from <?php echo $parent->display("nname"); ?> </font></td><td><img src="<?php echo $imgheadright; ?> "></td></tr></table></td></tr></table> </td></tr><tr><td height=0 colspan=2></td></tr></table> <?php } ?> <!-- </td></tr><tr><td height=2 colspan=2></td></tr></table> --> <tr><td bgcolor="#ffffff"></td> <?php $imguparrow = get_general_image_path() . "/button/uparrow.gif"; $imgdownarrow = get_general_image_path() . "/button/downarrow.gif"; foreach ($name_list as $name => $width) { $desc = "__desc_{$name}"; $descr[$name] = get_classvar_description($class, $desc); if (!$descr[$name]) { print "Cannot access static variable {$class}::{$desc}"; exit(0); } if (csa($descr[$name][2], ':')) { $_tlist = explode(':', $descr[$name][2]); $descr[$name][2] = $_tlist[0]; } foreach ($descr[$name] as &$d) { if ($this->is_special_url($d)) { continue; } if (strstr($d, "%v") !== false) { $d = str_replace("[%v]", $classdesc[2], $d); } } if ($width === "100%") { $wrapstr = "wrap"; } else { $wrapstr = "nowrap"; } if ($sortby && $sortby === $name) { $wrapstr .= " background={$imgtablerowheadselect}"; print "<td width={$width} {$wrapstr} ><table cellpadding=0 cellspacing=0 border=0> <tr> <td rowspan=2 {$wrapstr}>"; } else { $wrapstr .= " background={$imgtablerowhead}"; print "<td width={$width} {$wrapstr} class=col>"; } ?> <b><?php $this->print_sortby($parent, $class, $unique_name, $name, $descr[$name]); ?> </b></font> <?php $imgarrow = $sortdir === "desc" ? $imgdownarrow : $imguparrow; if ($sortby && $sortby === $name) { print "</td> <td width=15><img src=" . $imgarrow . " ></td><td ></td></tr></table>"; } ?> </td> <?php } $count = 0; $rowcount = 0; ?> <td width=10 background=<?php echo $imgtablerowhead; ?> > <form name="formselectall<?php echo $unique_name; ?> " value=hello> <input type=checkbox name="selectall<?php echo $unique_name; ?> " value=on <?php if ($sellist) { echo "checked disabled"; } ?> onclick="javascript:calljselectall<?php echo $unique_name; ?> ()"></form> </td> <?php print "</tr> "; print_time('loop'); $n = 1; foreach ((array) $obj_list as $okey => $obj) { $checked = ''; // Fix This. if ($sellist) { $checked = "checked disabled"; if (!array_search_bool($obj->nname, $sellist)) { continue; } } $imgpointer = get_general_image_path() . "/button/pointer.gif"; $imgblank = get_general_image_path() . "/button/blank.gif"; ?> <script> loadImage('<?php echo $imgpointer; ?> ') </script> <script> loadImage('<?php echo $imgblank; ?> ') </script> <tr id=tr<?php echo $unique_name . $rowcount; ?> class=tablerow<?php echo $count; ?> onmouseover=" swapImage('imgpoint<?php echo $rowcount; ?> ','','<?php echo $imgpointer; ?> ',1);" onmouseout="swapImgRestore();"> <td id=td<?php echo $unique_name . $rowcount; ?> width=5 class=rowpoint><img name=imgpoint<?php echo $rowcount; ?> src="<?php echo $imgblank; ?> "></td> <?php $colcount = 1; foreach ($name_list as $name => $width) { $this->printObjectElement($parent, $class, $classdesc, $obj, $name, $width, $descr, $colcount . "_" . $rowcount); $colcount++; } $basename = basename($obj->nname); $selectshowbase = $this->frm_selectshowbase; // issue #609 // $ret = strfrom($parent->nname, $selectshowbase); $ret = str_replace('//', '/', strfrom($parent->nname, $selectshowbase)); print " <td width=10 >"; print "<a class=button href=\"javascript:callSetSelectFolder('/{$ret}/{$basename}')\">"; print " Select </a>"; print "</tr> "; if ($count === 0) { $count = 1; } else { $count = 0; } $rowcount++; if (!$sellist) { if ($n === $pagesize * $cgi_pagenum) { break; } } $n++; } print_time('loop', "loop{$n}"); print "<tr><td></td><td colspan={$nlcount}>"; if (!$rowcount) { if ($ghtml->frm_searchstring) { ?> <table width=95%> <tr align=center> <td width=100%> <b> No Matches Found </b> </td> </tr> </table> <?php } else { ?> <table width=95%> <tr align=center> <td width=100%> <b> No <?php echo get_plural($classdesc[2]); ?> under <?php echo $parent->nname; ?> </b> </td> </tr> </table> <?php } } print "</td></tr>"; print "<tr><td class=rowpoint></td><td colspan=" . $nlcount . " >\n <table cellpadding=0 cellspacing=0 border=0 width=100%>\n <tr height=1 style='background:url({$imgtopline})'><td></td></tr>\n <tr><td>"; ?> <script>ckcount<?php echo $unique_name; ?> = <?php echo $rowcount . "; "; ?> function calljselectall<?php echo $unique_name; ?> (){ jselectall(document.formselectall<?php echo $unique_name; ?> .selectall<?php echo $unique_name; ?> ,ckcount<?php echo $unique_name; ?> ,'<?php echo $unique_name; ?> ') } </script> <?php print "<table> <tr> <td >"; print "<a class=button href=\"javascript:window.close()\"> Cancel </a> "; print "</td> <td width=30> </td> <td >"; print "</td> </tr> </table> "; print "</td></tr></table></tr></table></td> </tr> </table>"; //else { // // $this->print_list_submit($blist); // } //print_time("$class.objecttable", "$class.objecttable"); /// Important. This is to make sure that the session saving etc doesn't take place. We just need a plain and clean window without any saving. If this happens the current url gets added to the sessiona and redirection will screw up. exit; }
function getTaskName() { $taskname = substr($this->main->nname, 22); $taskname = fix_nname_to_be_variable($taskname); return $taskname; }
function createDefaultDatabase() { $dbname = fix_nname_to_be_variable($this->nname); $dbname = substr($dbname, 0, 15); $mysql = new Mysqldb(null, null, $dbname); $rl['primarydb'] = 'on'; $rl['dbname'] = $dbname; $rl['dbpassword'] = $this->realpass; $rl['username'] = $dbname; $rl['dbtype'] = 'mysql'; $rl['syncserver'] = $this->mysqldbsyncserver; $rl['parent_clname'] = $this->getClName(); $mysql->create($rl); $this->addToList('mysqldb', $mysql); return $mysql; }