From: <bed...@us...> - 2007-01-19 19:28:12
|
Revision: 66 http://svn.sourceforge.net/easybox-mod/?rev=66&view=rev Author: bedelaitre Date: 2007-01-19 11:27:20 -0800 (Fri, 19 Jan 2007) Log Message: ----------- Suppression du print_r sur la lecture des disques qui affiche un message ?\195?\160 l'initialisation de l'application Modified Paths: -------------- trunk/_framework/fonctions_partagees.inc.php Modified: trunk/_framework/fonctions_partagees.inc.php =================================================================== --- trunk/_framework/fonctions_partagees.inc.php 2007-01-14 08:38:36 UTC (rev 65) +++ trunk/_framework/fonctions_partagees.inc.php 2007-01-19 19:27:20 UTC (rev 66) @@ -228,7 +228,7 @@ $obj = null; } } - print_r($lect); + //print_r($lect); RETURN($lect); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ara...@us...> - 2007-01-21 19:49:19
|
Revision: 68 http://svn.sourceforge.net/easybox-mod/?rev=68&view=rev Author: aragornis Date: 2007-01-21 11:49:17 -0800 (Sun, 21 Jan 2007) Log Message: ----------- Modified Paths: -------------- trunk/_framework/fonctions_partagees.inc.php Modified: trunk/_framework/fonctions_partagees.inc.php =================================================================== --- trunk/_framework/fonctions_partagees.inc.php 2007-01-20 22:31:24 UTC (rev 67) +++ trunk/_framework/fonctions_partagees.inc.php 2007-01-21 19:49:17 UTC (rev 68) @@ -167,10 +167,7 @@ sqlite_close($db); } -// BDE - 18/10/2006 - Modification dans la gestion des disques -// Ajout de l'ic\xF4ne \xE0 utiliser -// L'affichage des disques KO est en commentaires. Je ne sais pas si c'est utile -// ou pas. Il suffit de d\xE9commenter si n\xE9cessaire +// Liste les disques function DISQUES(){ $lect=array(); if (PHP_OS == "WIN32" || PHP_OS == "WINNT") { @@ -232,6 +229,7 @@ RETURN($lect); } +// D\xE9finit le META['refresh'] function set_refresh($time, $string, $bool=false){ global $time_refresh, $cansetfrontpannel, $META; if($time_refresh>=$time OR !$time_refresh){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gu...@us...> - 2007-05-13 20:26:28
|
Revision: 150 http://svn.sourceforge.net/easybox-mod/?rev=150&view=rev Author: guyou Date: 2007-05-13 13:26:26 -0700 (Sun, 13 May 2007) Log Message: ----------- Gestion cron Ajout de fonctions pour manipuler le fichier cron. Modified Paths: -------------- trunk/_framework/fonctions_partagees.inc.php Modified: trunk/_framework/fonctions_partagees.inc.php =================================================================== --- trunk/_framework/fonctions_partagees.inc.php 2007-05-12 14:42:31 UTC (rev 149) +++ trunk/_framework/fonctions_partagees.inc.php 2007-05-13 20:26:26 UTC (rev 150) @@ -15,6 +15,68 @@ save_variable('current_type',$type); } +function remove_from_cron($chaine) { + + $cron = '/etc/cron.d/easybox'; + + // Par souci de protection on s'assure qu'on n'est pas appele + // sur une platfeforme windows + if (! (PHP_OS == "WIN32" || PHP_OS == "WINNT")) { + // extra protection + if (is_writable($cron)) { + // On recherche les lignes qui appellent la chaine + if ($fp = @fopen($cron,"r+")) { + $status=1; + $nok=0; + $newbuffer = ''; + while (! feof($fp)) { + if ($buffer = @fgets($fp, 4096)) { + if (strlen($buffer) > 0) { + if (! strstr($buffer, $chaine)) { + if ($nok++ == 0) { + $newbuffer = $buffer; + } else { + $newbuffer .= $buffer; + } + } + } + } else { + $status=0; + break; + } + } + if ($status == 0) { + if (@rewind($fp)) { + if (@fwrite($fp, $newbuffer)) { + @ftruncate($fp, strlen($newbuffer)); + } + } + } + @fclose($fp); + } + } + } +} + +function add_to_cron($fichier1, $deb, $fichier2, $end) { + $cron = '/etc/cron.d/easybox'; + + // Par souci de protection on s'assure qu'on n'est pas appele + // sur une platfeforme windows + if (! (PHP_OS == "WIN32" || PHP_OS == "WINNT")) { + // extra protection + if (is_writable($cron)) { + + if ($fp = @fopen('/etc/cron.d/easybox',"a+")) { + @fputs($fp, date("i", $deb).' '.date("H", $deb).' '.date("j", $deb).' '.date("n", $deb)." * www-data /bin/sh '".$fichier1."'\n"); + @fputs($fp, date("i", $end).' '.date("H", $end).' '.date("j", $end).' '.date("n", $end)." * www-data /bin/sh '".$fichier2."'\n"); + @fclose($fp); + } + } + } +} + + function supprime_accents($chaine) { $a = "\xE0\xE1\xE2\xE3\xE4\xE5\xF2\xF3\xF4\xF5\xF6\xF8\xE8\xE9\xEA\xEB\xE7\xEC\xED\xEE\xEF\xF9\xFA\xFB\xFC\xFF\xF1"; $b = "aaaaaaooooooeeeeciiiiuuuuyn"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |