function array_rwalk(&$array, $function) { foreach ($array as $key => $value) { if (is_array($value)) { array_rwalk($value, $function); $array[$key] = $value; } else { $array[$key] = $function($value); } } }
function array_rwalk(&$array, $function) { global $DatabaseServer, $DatabaseUsername, $DatabasePassword, $DatabaseName, $DatabasePort, $DatabaseType, $connection; $connection = new mysqli($DatabaseServer, $DatabaseUsername, $DatabasePassword, $DatabaseName); if ($connection->connect_errno > 0) { die('Not connected'); } foreach ($array as $key => $value) { if (is_array($value)) { array_rwalk($value, $function); $array[$key] = $value; } else { $val = mysqli_real_escape_string($connection, $value); $array[$key] = $function($val); } } }
# # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # #*************************************************************************************** //error_reporting(1); include "functions/ParamLib.php"; include 'Redirect_root.php'; $url = validateQueryString(curPageURL()); if ($url === FALSE) { header('Location: index.php'); } error_reporting(E_ERROR); $start_time = time(); include 'Warehouse.php'; array_rwalk($_REQUEST, 'strip_tags'); if (!isset($_REQUEST['_openSIS_PDF'])) { Warehouse('header'); //if(strpos($_REQUEST['modname'],'misc/')===false && $_REQUEST['modname']!='Students/Student.php' && $_REQUEST['modname']!='School_Setup/Calendar.php' && $_REQUEST['modname']!='Scheduling/Schedule.php' && $_REQUEST['modname']!='Attendance/Percent.php' && $_REQUEST['modname']!='Attendance/Percent.php?list_by_day=true' && $_REQUEST['modname']!='Scheduling/MassRequests.php' && $_REQUEST['modname']!='Scheduling/MassSchedule.php' && $_REQUEST['modname']!='Student_Billing/Fees.php') //if(strpos($_REQUEST['modname'],'misc/')===false) if (strpos(optional_param('modname', '', PARAM_NOTAGS), 'misc/') === false) { echo '<script language="JavaScript">if(window == top && (!window.opener || window.opener.location.href.substring(0,(window.opener.location.href.indexOf("&")!=-1?window.opener.location.href.indexOf("&"):window.opener.location.href.replace("#","").length))!=window.location.href.substring(0,(window.location.href.indexOf("&")!=-1?window.location.href.indexOf("&"):window.location.href.replace("#","").length)))) window.location.href = "index.php";</script>'; } echo "<BODY onload='doOnload();'>"; echo '<DIV id="Migoicons" style="visibility:hidden;position:absolute;z-index:1000;top:-100"></DIV>'; echo "<TABLE width=100% border=0 cellpadding=0><TR><TD valign=top align=center>"; } //if($_REQUEST['modname']) if (optional_param('modname', '', PARAM_NOTAGS)) { if ($_REQUEST['_openSIS_PDF'] == 'true') { ob_start();