
anyways: I installed the new update of Tellit 0.1.2, And it automatically setup my user to look for language "nb" (Norwegian Bokmål) I had to manually go into mysql and change it to "en" for the site to work... <-- just so you know

Moderator: Telldus
Code: Select all
//If lamp is not dimable
else{
switch($status){
case 0:
$toggle=1;
system($tellstickExecutableFullPath." -n ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
error_log($tellstickExecutableFullPath." -n ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
break;
case 1:
$toggle=0;
system($tellstickExecutableFullPath." -f ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
error_log($tellstickExecutableFullPath." -f ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
break;
case 2:
$toggle=0;
system($tellstickExecutableFullPath." -f ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
error_log($tellstickExecutableFullPath." -f ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
break;
}
mysql_query("UPDATE tellit_item SET activity='".date("D M j G:i:s T Y")."', status='".$toggle."' WHERE device=(select device from (select * from tellit_item) as x where id='".$_GET['id']."') && house=(select house from (select * from tellit_item) as x where id='".$_GET['id']."') && number=(select number from (select * from tellit_item) as x where id='".$_GET['id']."')") or die(mysql_error());
}
//system($tellstickExecutableFullPath." -f ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
// error_log($tellstickExecutableFullPath." -f ".strtoupper($item). " " .$tellstickExecutableFullPathEnd);
Code: Select all
//Add lamp
if(isset($_GET["additem"]) && $_GET["additem"]==1){
if(empty($_POST["dimmer"])){
$_POST["dimmer"]=0;
}
else{
$_POST["dimmer"]=1;
}
if(!stristr($add=validate_input($_POST,"room=Char(32),name=Char(32),device=CHAR(32),house=CHAR(1),number=int(1),dimmer=NULL"),"RROR")){
mysql_query("INSERT INTO tellit_item(room,name,device,house,number,dimmer) VALUES('".$add["room"]."','".$add["name"]."','".$add["device"]."','".$add["house"]."','".$add["number"]."','".$add["dimmer"]."')");
}
header("Location: ?");
}