Cosmetic, as usual

This commit is contained in:
Alan Garcia 2014-03-26 15:40:43 +00:00
parent b305d5a506
commit 4b7890ea64
6 changed files with 30 additions and 27 deletions

View File

@ -76,13 +76,9 @@ $dom->unlock();
<?php <?php
switch ($dt['target']) { switch ($dt['target']) {
case "NONE":
default:
break;
case "DIRECTORY": ?> case "DIRECTORY": ?>
<input type="text" class="int" name="t_<?php echo $dt['name']?>" id="t_<?php echo $dt['name']?>" value="<?php ehe($targval); ?>" size="28" onKeyPress="getElementById('r_<?php echo $dt['name']?>').checked=true;" /> <input type="text" class="int" name="t_<?php echo $dt['name']?>" id="t_<?php echo $dt['name']?>" value="<?php ehe($targval); ?>" size="28" onKeyPress="getElementById('r_<?php echo $dt['name']?>').checked=true;" />
<?php display_browser( $targval , "main.t_".$dt['name'] ); ?> <?php display_browser( $targval , "main.t_".$dt['name'] );
<?php
break; break;
case "URL": ?> case "URL": ?>
<input type="text" class="int" name="t_<?php echo $dt['name']?>" id="t_<?php echo $dt['name']?>" value="<?php ehe( (empty($targval)?'http://':$targval) ); ?>" size="50" onKeyPress="getElementById('r_<?php echo $dt['name']?>').checked=true;" /> <input type="text" class="int" name="t_<?php echo $dt['name']?>" id="t_<?php echo $dt['name']?>" value="<?php ehe( (empty($targval)?'http://':$targval) ); ?>" size="50" onKeyPress="getElementById('r_<?php echo $dt['name']?>').checked=true;" />
@ -104,6 +100,9 @@ $dom->unlock();
<input type="text" class="int" name="t_<?php echo $dt['name']?>" id="t_<?php echo $dt['name']?>" value="<?php ehe($targval);?>" size="32" onKeyPress="getElementById('r_<?php echo $dt['name']?>').checked=true;" /> <input type="text" class="int" name="t_<?php echo $dt['name']?>" id="t_<?php echo $dt['name']?>" value="<?php ehe($targval);?>" size="32" onKeyPress="getElementById('r_<?php echo $dt['name']?>').checked=true;" />
<small><?php __("(enter a domain name or subdomain)"); ?></small><?php <small><?php __("(enter a domain name or subdomain)"); ?></small><?php
break; break;
case "NONE":
default:
break;
} // switch ?> } // switch ?>
</td> </td>
</tr> </tr>

View File

@ -27,6 +27,7 @@ class DB_Sql {
/* public: result array and current row number */ /* public: result array and current row number */
var $Record = array(); var $Record = array();
var $Row; var $Row;
var $num_rows;
/* public: current error number and error text */ /* public: current error number and error text */
var $Errno = 0; var $Errno = 0;

View File

@ -176,7 +176,7 @@ class m_action {
* @global m_mysql $db * @global m_mysql $db
* @global m_err $err * @global m_err $err
* @param string $type * @param string $type
* @param m_user $user * @param string|integer $user wich user do we impersonate?
* @param mixed $parameters * @param mixed $parameters
* @return boolean * @return boolean
*/ */
@ -226,7 +226,7 @@ class m_action {
* @param type $all * @param type $all
* @return boolean * @return boolean
*/ */
function get_old($all = null) { function get_old() {
global $err, $db; global $err, $db;
$purge = "select * from actions where TO_DAYS(curdate()) - TO_DAYS(creation) > 2;"; $purge = "select * from actions where TO_DAYS(curdate()) - TO_DAYS(creation) > 2;";

View File

@ -1091,6 +1091,7 @@ class m_dom {
$err->raise("dom",_("The domain name is syntaxically incorrect")); $err->raise("dom",_("The domain name is syntaxically incorrect"));
return false; return false;
} }
$r=array();
$r["name"]=$dom; $r["name"]=$dom;
$db->query("SELECT * FROM domaines WHERE compte='$cuid' AND domaine='$dom'"); $db->query("SELECT * FROM domaines WHERE compte='$cuid' AND domaine='$dom'");
if ($db->num_rows()==0) { if ($db->num_rows()==0) {
@ -1509,6 +1510,7 @@ class m_dom {
if (!$db->next_record()) { if (!$db->next_record()) {
return false; return false;
} }
$res=array();
do { do {
$res[]=$db->Record; $res[]=$db->Record;
} while ($db->next_record()); } while ($db->next_record());

View File

@ -1072,12 +1072,13 @@ class m_mysql {
global $db,$err,$cuid; global $db,$err,$cuid;
$err->log("mysql","export"); $err->log("mysql","export");
$db->query("SELECT login, pass, db, bck_mode, bck_dir, bck_history, bck_gzip FROM db WHERE uid='$cuid';"); $db->query("SELECT login, pass, db, bck_mode, bck_dir, bck_history, bck_gzip FROM db WHERE uid='$cuid';");
$str="";
if ($db->next_record()) { if ($db->next_record()) {
$str =" <sql>\n"; $str.=" <sql>\n";
$str.=" <login>".$db->Record["login"]."</login>\n"; $str.=" <login>".$db->Record["login"]."</login>\n";
$str.=" <pass>".$db->Record["pass"]."</pass>\n"; $str.=" <pass>".$db->Record["pass"]."</pass>\n";
do { do {
$filename=$tmpdir."/mysql.".$db->Record["db"].".sql.gz"; $filename=$tmpdir."/mysql.".$db->Record["db"].".sql.gz"; // FIXME not used
$str.=" <database>".($db->Record["db"])."</database>\n"; $str.=" <database>".($db->Record["db"])."</database>\n";
$str.=" <password>".($db->Record["pass"])."</password>\n"; $str.=" <password>".($db->Record["pass"])."</password>\n";
if ($s["bck_mode"]!=0) { // FIXME what is $s ? if ($s["bck_mode"]!=0) { // FIXME what is $s ?

View File

@ -145,7 +145,7 @@ $queryList = array(
foreach ($queryList as $exec_command) { foreach ($queryList as $exec_command) {
exec($exec_command,$output,$return_var); exec($exec_command,$output,$return_var);
if( $return_var){ if( $return_var){
throw new \Exception("[!] Mysql exec error : $exec_command \n Error : \n ".print_r($output,1)); throw new \Exception("[!] Mysql exec error : $exec_command \n Error : \n ".print_r($output,true));
} }
} }
$db = new \DB_system($user,$database,$password); $db = new \DB_system($user,$database,$password);