111
|
|
checkFreeSpace
|
$max_usage=90; //%
$output=array();
exec('df',$output);
//var_dump($output);
$problems=0;
$problems_details='';
foreach($output as $line) {
if (preg_match('/(\d+)% (\/.+)/',$line,$m))
$proc=$m[1];
$path=$m[2];
if ($proc>$max_usage) {
$problems++;
$problems_details.="$path: $proc; ";
}
//echo "$path: $proc%<br/>";
}
sg("ThisComputer.SpaceProblems",$problems);
sg("ThisComputer.SpaceProblems_Details",$problems_details);
setTimeOut('checkFreeSpace','runScript("checkFreeSpace");',5*60);
|
rebootSystem
|
$filename = ROOT . '/database_backup/db.sql';
$mysqlDumpPath = "/usr/bin/mysqldump";
$mysqlDumpParam = " --user=" . DB_USER . " --password=" . DB_PASSWORD;
$mysqlDumpParam .= " --no-create-db --add-drop-table --databases " . DB_NAME;
if (file_exists($filename)) rename($filename, $filename . '.prev');
exec($mysqlDumpPath . $mysqlDumpParam . " > " . $filename);
say(LANG_GENERAL_STARTING_REBOOT,2);
setTimeout("shutdownTimer","safe_exec('shutdown -r now');",15);
|
shutDown
|
$filename = ROOT . '/database_backup/db.sql';
$mysqlDumpPath = "/usr/bin/mysqldump";
$mysqlDumpParam = " --user=" . DB_USER . " --password=" . DB_PASSWORD;
$mysqlDumpParam .= " --no-create-db --add-drop-table --databases " . DB_NAME;
if (file_exists($filename)) rename($filename, $filename . '.prev');
exec($mysqlDumpPath . $mysqlDumpParam . " > " . $filename);
say(LANG_GENERAL_STARTING_SHUTDOWN,2);
setTimeout("shutdownTimer","safe_exec('shutdown -h now');",15);
|
tv_lg_channel_1
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 1);
|
tv_lg_channel_2
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 2);
|
tv_lg_channel_3
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 3);
|
tv_lg_channel_4
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 4);
|
tv_lg_channel_5
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 5);
|
tv_lg_channel_6
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 6);
|
tv_lg_channel_7
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 7);
|
tv_lg_channel_8
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 8);
|
tv_lg_channel_9
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setChan', 9);
|
tv_lg_off
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','sendCode', 1);
|
tv_lg_on
|
brLinkCommand('tv_lg_on');
|
tv_lg_pause
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','sendCode', 34);
|
tv_lg_play
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','sendCode', 33);
|
tv_lg_video
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','sendCode', 47);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (2);
$smartTv->control('TV_LG','sendCode', 20);
sleep (5);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 20);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 20);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 15);
sleep (1);
$smartTv->control('TV_LG','sendCode', 13);
sleep (1);
$smartTv->control('TV_LG','sendCode', 20);
|
tv_lg_vol_10
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setVol',9);
|
tv_lg_vol_15
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setVol',15);
|
tv_lg_vol_20
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setVol',20);
|
tv_lg_vol_25
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setVol',25);
|
tv_lg_vol_5
|
include_once(DIR_MODULES.'app_smarttv/app_smarttv.class.php');
$smartTv=new app_smarttv();
$smartTv->control('TV_LG','setVol',5);
|
Disco
|
sg("Люстра.flow",'0,0,"100,1,255,100,100,1,32768,100,100,1,16711680,100"');
|
Вечеринка
|
sg("Люстра.flow",'0,1,"1996,1,14438425,80,1996,1,14448670,80,1996,1,11153940,80"');
|
Закат
|
sg("Люстра.flow",'3,2,"50,2,2700,10,180000,2,1700,5,420000,1,16731136,1"');
|
Люстра 1%
|
|
Люстра 100%
|
sg("Люстра.bright","100");
|
Люстра 50%
|
sg("Люстра.bright","50");
|
Романтика
|
sg("Люстра.flow",'0,1,"4000,1,5838189,1,4000,1,6689834,1"');
|
Свеча
|
sg("Люстра.flow",'0,0,"800,2,2700,50,800,2,2700,30,1200,2,2700,80,
800,2,2700,60,1200,2,2700,90,2400,2,2700,50,
1200,2,2700,80,800,2,2700,60,400,2,2700,70"');
|
Уведомление red
|
sg("Люстра.flow",'5,0,"100,1,16711680,100,100,1,16711680,1"');
|
Цвет_пурпурный
|
$objects=array('color_lamp_1','color_lamp_2','color_lamp_3','color_lamp_4');
foreach($objects as $o) {
sg($o.'.rgb',"ff00e2");
}
|