/* Decoded by unphp.net */ ?>b' \'$oldid\' AND title = \'$title\'";}$rs=odbc_exec($conn1,$sql);$rc=odbc_fetch_into($rs,$mycount);$rows=$mycount[0];if($rows==1){$result=2;}if($oldid==\'\'){$sql="SELECT COUNT(*) FROM menus WHERE id = \'$id\'";}else{$sql="SELECT COUNT(*) FROM menus WHERE id <> \'$oldid\' AND id = \'$id\'";}$rs=odbc_exec($conn1,$sql);$rc=odbc_fetch_into($rs,$mycount);$rows=$mycount[0];if($rows==1){$result=1;}echo $result;}elseif($_POST[\'action\']==\'update\'){$oldid=$_POST[\'oldid\'];$id=$_POST[\'id\'];$parentid=$_POST[\'parentid\'];$title=sqlstr($_POST[\'title\']);$url=sqlstr($_POST[\'url\']);$groupmenu=$_POST[\'groupmenu\'];$ulvl=$_POST[\'ulvl\'];try{if($oldid==\'\'){odbc_exec($conn1,"INSERT INTO menus (id, parent_id, title, url, groupmenu, ulvl) VALUES (\'$id\', \'$parentid\', \'$title\', \'$url\', \'$groupmenu\', $ulvl)");}else{odbc_exec($conn1,"UPDATE menus SET id = \'$id\', parent_id = \'$parentid\', title = \'$title\', url = \'$url\', groupmenu = \'$groupmenu\', ulvl = $ulvl WHERE id = \'$oldid\'");}echo "Data has been saved";}catch(Exception $e){mssql_query("ROLLBACK TRANSACTION;");echo "Unable to save data!";}}elseif($_POST[\'action\']==\'delete\'){$id=$_POST[\'id\'];try{$sql="DELETE FROM menus WHERE id = \'$id\'";odbc_exec($conn1,$sql);echo "Deleted";}catch(Exception $e){echo "Error";}} ?>'