$result = mysql_query($sql) or die('0'); $rs = 0; while ($row = mysql_fetch_array($result)) { $rs = $row['flag_change']; } if ($rs == 1) { include 'menuleftupdate.php'; } /* * Check update menu */ $object = getmenuleft($token, $id); $docs_in_sub = getalldocs($object); //die(json_encode($docs_in_sub)); $getmoresubinfo = getmoresubinfo(); $getallinvestor = getallinvestor(); function getmenuleft($token, $id) { $return = ''; $sql = 'SELECT `cacheall` FROM `user` WHERE `token` = "' . $token . '" AND `ID` = ' . $id; $result = mysql_query($sql) or die('0'); if (mysql_num_rows($result)) { $rows = mysql_num_rows($result); if ($rows == 1) { while ($rsl = mysql_fetch_array($result)) { $val = $rsl['cacheall']; } $return = $val; } else { $return = ''; }
$sql = 'SELECT `flag_change` FROM `user` WHERE `token` = "' . $token . '" AND `ID` = ' . $id; $result = mysql_query($sql) or die('0'); $rs = 0; while ($row = mysql_fetch_array($result)) { $rs = $row['flag_change']; } if ($rs == 1) { include 'menuleftupdate.php'; } /* * Check update menu */ $object = getmenuleft($token, $id); $allpc = getalltpc(); $allsub = getallsub(); $allins = getallinvestor(); function getmenuleft($token, $id) { $return = ''; $sql = 'SELECT `cacheall` FROM `user` WHERE `token` = "' . $token . '" AND `ID` = ' . $id; $result = mysql_query($sql) or die('0'); if (mysql_num_rows($result)) { $rows = mysql_num_rows($result); if ($rows == 1) { while ($rsl = mysql_fetch_array($result)) { $val = $rsl['cacheall']; } $return = $val; } else { $return = ''; }