Example #1
0
  along with pFrog; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*******************************************************************************/
require_once 'includes/common.php';
$title = "Modify Tileset";
require_once 'includes/widgets/mini_header.php';
require_once 'libAllure/util/shortcuts.php';
if (isset($submit)) {
    $tileset = str_replace(' [image]', '.jpg', $tileset);
    $tileset = str_replace(' ', '_', $tileset);
}
print_r($_REQUEST);
$row = san()->filterUint('row');
$col = san()->filterUint('column');
$quadrent = san()->filterString('quadrent');
function getCell($quadrant, $row, $col)
{
    global $db;
    // get info about cell
    $sql = 'SELECT * FROM `map` WHERE `quadrent` = :quadrant AND row = :row AND col = :col LIMIT 1';
    $stmt = $db->prepare($sql);
    $stmt->bindValue(':quadrant', $quadrant);
    $stmt->bindValue(':row', $row);
    $stmt->bindValue(':col', $col);
    $stmt->execute();
    $cell = $stmt->fetchRow();
    if (empty($cell)) {
        return array('tileset' => null, 'traversable' => false, 'exit' => null, 'exit_quadrent' => null, 'newCell' => true);
    } else {
        return $cell;
<?php

require_once 'includes/widgets/header.php';
$name = san()->filterString('name');
$repo = getRepositoryByName($name);
$repo->delete();
require_once 'includes/widgets/footer.php';
Example #3
0
function san($input)
{
    if (is_array($input)) {
        foreach ($input as $var => $val) {
            $output[$var] = san($val);
        }
    } else {
        // if (get_magic_quotes_gpc()) {
        //     $input = stripslashes($input);
        // }
        // $input  = cleanInput($input);
        $output = mysql_real_escape_string($input);
    }
    return $output;
}