• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP yasDB_clean函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中yasDB_clean函数的典型用法代码示例。如果您正苦于以下问题:PHP yasDB_clean函数的具体用法?PHP yasDB_clean怎么用?PHP yasDB_clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了yasDB_clean函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: intval



</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Account Activated</title>
</head>
<body>
<div id="body_wrapper">
    <div id="wrapper"><div id="menu">Your Account:</div>
	<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 98%;">
<?php 
include_once "includes/config.inc.php";
include_once "includes/db_functions.inc.php";
$id = intval($_GET['id']);
$code = yasDB_clean($_GET['code']);
if ($id && $code) {
    $check = yasDB_select("SELECT id FROM user WHERE id={$id} AND randomkey='{$code}'", false);
    $checknum = $check->num_rows;
    if ($checknum == 1) {
        $activated = yasDB_update("UPDATE user SET activated='1' WHERE id='{$id}'", false);
        echo '<h4>Your account is now active you can now login!.<br />
 Click here to login.<br />
 <a href="' . $setting['siteurl'] . 'index.php">Login</a>
 </h4>';
    } else {
        echo '<h4>Invalid ID or Activation code.Please contact admin using our contact form<br />
   <a href="' . $setting['siteurl'] . 'contactus.html">Contact Us</a>
   </h4>';
    }
} else {
开发者ID:royalswe,项目名称:yas26,代码行数:29,代码来源:activated.php


示例2: yasDB_clean

<?php

include "db_functions.inc.php";
$userid = yasDB_clean($_GET['uid']);
$query = yasDB_select("SELECT * FROM `user` WHERE `id` = '{$userid}'");
$userdata = $query->fetch_array(MYSQLI_ASSOC);
?>
<br/><br/>
<form id="profile" name="profile" method="post" action="index.php?act=profile">
<?php 
if (!$userdata['oauth_provider']) {
    ?>
Name:<br />
<input type="text" name="name" value="<?php 
    echo $userdata['name'];
    ?>
" size="50" /><p>
<?php 
}
if ($userdata['oauth_provider'] != "facebook") {
    ?>
Email:<br />
<input type="email" name="email" value="<?php 
    echo $userdata['email'];
    ?>
" size="50" /><p>
<?php 
}
?>
Website:(Remember the http://)<br />
<input type="text" name="website" value="<?php 
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:loadprofile.inc.php


示例3: ini_set

<div id="center">
<?php 
include_once $setting['sitepath'] . '/includes/pagination.class.php';
$setting['gperpage'] = $setting['gperpage'] < 1 ? 15 : $setting['gperpage'];
?>

<div class="container_box1">
<div id="headergames2">Download Games</div>            
<?php 
ini_set("display_errors", 0);
if ($_POST['upload'] == "1") {
    include_once $setting['siteurl'] . "/includes/db_functions.inc.php";
    $email = yasDB_clean($_POST['email']);
    $query = yasDB_insert("INSERT INTO notifydown (email) VALUES ('{$email}')", false);
    if (!$query) {
        echo "Database Error!";
    } else {
        echo "<center>Email Submited!<br />We will send you email when we add new game.</center>";
    }
} else {
    echo '
	<center>
	<form method="post">
	<input type="hidden" name="upload" value="1" />
	Enter your email to be notified about our new addition of downloadable games:
	<br />
	<input type="text" name="email" maxlength="30" width="300" />
	<input type="submit"  value="Submit" />
	</form>
	</center>';
    $result = yasDB_select("SELECT count(id) FROM `downgames` ");
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:download.php


示例4: install_mochigame

    echo ' <a href="index.php?act=managemochi&page=' . $nextpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">NEXT</a>';
    echo ' <a href="index.php?act=managemochi&page=' . $lastpage . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">LAST</a>';
}
echo '</div>';
if (isset($_GET['install'])) {
    if ($_GET['install'] == 'Install') {
        install_mochigame($_GET['gameid']) or die("Game did not install successfully");
        echo '<script>alert("Game sucessfully installed.");</script>';
        if (isset($_GET['page'])) {
            $pageno = $_GET['page'];
        } else {
            $pageno = 1;
        }
        if (isset($_GET['category'])) {
            $category = $_GET['category'];
        } else {
            $category = 'all';
        }
        if (isset($_GET['rating'])) {
            $rating = $_GET['rating'];
        } else {
            $rating = 'all';
        }
        $description = yasDB_clean($_GET['description']);
        $keywords = yasDB_clean($_GET['keywords']);
        echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php?act=managemochi&page=' . $pageno . '&category=' . $category . '&rating=' . $rating . '&description=' . $description . '&keywords=' . $keywords . '&filter=Filter games">';
        exit;
    }
}
?>
</div>                      
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:manage_mochigames.php


示例5: yasDB_clean

<?php

include "../../../includes/db_functions.inc.php";
include "../../../includes/config.inc.php";
include "../../../includes/checklinks.class.php";
$post_text = yasDB_clean($_POST['text'], true);
$post_desc = yasDB_clean($_POST['description'], true);
$post_url = yasDB_clean($_POST['url']);
$post_reciprocal = yasDB_clean($_POST['reciprocal']);
$post_linkemail = yasDB_clean($_POST['linkemail']);
if (empty($post_text) or empty($post_url) or empty($post_reciprocal) or empty($post_linkemail) or empty($post_desc)) {
    echo "<h3>You didn't fill everything out for your link!</h3>";
    exit;
}
if ($_POST['recaptcha'] == 'yes') {
    include "../../../includes/securimage/securimage.php";
    $img = new Securimage();
    $valid = $img->check($_POST['code']);
    if (!$valid) {
        $passed = false;
    } else {
        $passed = true;
    }
} elseif ($_POST['recaptcha'] == 'no') {
    $answer = array('10', 'ten');
    if (!in_array(strtolower($_POST['security']), $answer)) {
        $passed = false;
    } else {
        $passed = true;
    }
}
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:process_linkrequest.php


示例6: install_playtomic

function install_playtomic($gameid)
{
    $table = '';
    $pre = 'ptomic';
    global $mysqli;
    $categories = array('Action' => 2, 'Adventure' => 3, 'Strategy' => 10, 'Multiplayer' => 2, 'Puzzle' => 1, 'Rhythm' => 7, 'Shooter' => 5, 'Sports' => 4, 'Other' => 7, 'RPG' => 3, 'Arcade' => 9, 'Driving' => 4, 'Defense' => 10, 'Rhythm' => 7, 'Education' => 7, 'Gadgets' => 1, 'Fighting' => 2, 'Dress Up' => 8, 'Board Game' => 7, 'Pimp & Customize' => 8, 'Pimp &amp; Customize' => 8);
    $query = yasDB_select("SELECT * FROM `playtomicfeed` WHERE `id` = '{$gameid}'", false);
    $result = $query->fetch_array(MYSQLI_ASSOC);
    $gamename = $result['name'];
    $thumburl = $result['thumburl'];
    $thumburl_200 = $result['thumbnail_200x200'];
    $screen1_thumb = '';
    $screen2_thumb = '';
    $screen3_thumb = '';
    $screen4_thumb = '';
    $gameurl = $result['gameurl'];
    $c = explode(",", $result['categories']);
    // Remove comma delimiter and seperate categories into array in order to insert single category.
    $category = $categories[$c[0]];
    $slug = str_replace(array('-', '_'), '', $result['slug']);
    // Download and save game file
    $game_file = $pre . "_" . $slug . "." . GetFileExtension($result['gameurl']);
    $game_url = '../swf/' . $game_file;
    download_file($gameurl, $game_url);
    $gamefile = 'swf/' . $game_file;
    // Download and save 100x100 thumbnail pic
    $smallthumb = $pre . "_" . $slug . "." . GetFileExtension($result['thumburl']);
    $sm_thumb = '../img/' . $smallthumb;
    download_file($thumburl, $sm_thumb);
    $gamethumb = 'img/' . $smallthumb;
    // Download and save 200x200 thumbnail pic
    $gamethumb200 = '';
    /*if(!empty($result['thumbnail_200x200']) || $type == 0) {
    		$t_url = str_replace("..", "", $result['thumbnail_200x200']);
    		$mediumthumb = $pre."_200_" . $slug . "." . GetFileExtension($result['thumbnail_200x200']);
    		$med_thumb = '../img/' . $mediumthumb;			
    		download_file($t_url, $med_thumb);
    		$gamethumb200 = 'img/' . $mediumthumb; 
    	} else {
    		$gamethumb200 = '';
    	}*/
    /////////////////////////////////////////////////////////////////////////////////////////////////
    // Remove code comment to download the game screen images - depends on availabilty in the feed //
    /////////////////////////////////////////////////////////////////////////////////////////////////
    /*
    // Download and save screen 1 pic
    if($result['screenthumburl1']) {
    	$t_url = str_replace("..", "", $result['screenthumburl1']);
    	$largethumb = $pre."_screen1_" . $slug . "." . GetFileExtension($result['screenthumburl1']);
    	$screen1_thumb = '../img/' . $largethumb;			
    	download_file($t_url, $screen1_thumb);
    }	
    // Download and save screen 2 pic
    if($result['screenthumburl2']) {
    	$t_url = str_replace("..", "", $result['screenthumburl2']);
    	$largethumb = $pre."_screen2_" . $slug . "." . GetFileExtension($result['screenthumburl2']);
    	$screen2_thumb = '../img/' . $largethumb;			
    	download_file($t_url, $screen2_thumb);
    }	
    // Download and save screen 3 pic
    if($result['screenthumburl3']) {
    	$t_url = str_replace("..", "", $result['screenthumburl3']);
    	$largethumb = $pre."_screen3_" . $slug . "." . GetFileExtension($result['screenthumburl3']);
    	$screen3_thumb = '../img/' . $largethumb;			
    	download_file($t_url, $screen3_thumb);
    }	
    // Download and save screen 4 pic
    if($result['screenthumburl2']) {
    	$t_url = str_replace("..", "", $result['screenthumburl4']);
    	$largethumb = $pre."_screen4_" . $slug . "." . GetFileExtension($result['screenthumburl4']);
    	$screen4_thumb = '../img/' . $largethumb;			
    	download_file($t_url, $screen4_thumb);
    }	
    */
    $desc = yasDB_clean($result['description']);
    // Prep for DB insert
    $instructions = yasDB_clean($result['instructions']);
    $keywords = $result['keywords'];
    $keywords = yasDB_clean($keywords);
    $gamename = yasDB_clean($gamename);
    $gamefile = yasDB_clean($gamefile);
    $gamethumb = yasDB_clean($gamethumb);
    $height = $result['height'];
    $width = $result['width'];
    $query->close();
    $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '{$instructions}', '{$keywords}', '{$gamefile}', '{$height}', '{$width}', {$category}, 0, '', 'SWF', 'PLAYTOMIC', {$gameid}, '{$gamethumb}', '{$gamethumb200}', '{$screen1_thumb}', '{$screen2_thumb}','{$screen3_thumb}','{$screen4_thumb}')", false);
    if (!$query) {
        echo 'Error updating Games database';
        return false;
    }
    $query = yasDB_update("UPDATE `playtomicfeed` SET isinstalled = 1 WHERE id = '{$result['id']}'", false);
    if (!query) {
        echo 'Error updating $table database';
        return false;
    }
    return true;
}
开发者ID:royalswe,项目名称:yas26,代码行数:97,代码来源:playtomic_functions.php


示例7: install_vascogame

}
echo ' ( Page ' . $pageno . ' of ' . $lastpage . ' ) ';
if ($pageno == $lastpage) {
    echo ' NEXT LAST ';
} else {
    $nextpage = $pageno + 1;
    echo ' <a href="index.php?act=managevasco&page=' . $nextpage . '&category=' . $category . '&description=' . $description . '&filter=Filter games">NEXT</a>';
    echo ' <a href="index.php?act=managevasco&page=' . $lastpage . '&category=' . $category . '&description=' . $description . '&filter=Filter games">LAST</a>';
}
echo '</div>';
if (isset($_GET['install'])) {
    if ($_GET['install'] == 'Install') {
        install_vascogame($_GET['gameid']) or die("Game did not install successfully");
        echo '<script>alert("Game sucessfully installed.");</script>';
        if (isset($_GET['page'])) {
            $pageno = $_GET['page'];
        } else {
            $pageno = 1;
        }
        if (isset($_GET['category'])) {
            $category = $_GET['category'];
        } else {
            $category = 'all';
        }
        $description = yasDB_clean($_GET['description']);
        echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php?act=managevasco&page=' . $pageno . '&category=' . $category . '&description=' . $description . '&filter=Filter games;">';
        exit;
    }
}
?>
</div>                      
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:manage_vascogames.php


示例8: yasDB_clean

    $post_desc = yasDB_clean($_POST['description'], true);
    $post_url = yasDB_clean($_POST['url']);
    $post_reciprocal = yasDB_clean($_POST['reciprocal']);
    $post_linkemail = yasDB_clean($_POST['linkemail']);
} else {
    $post_text = '';
    $post_desc = '';
    $post_url = '';
    $post_reciprocal = '';
    $post_linkemail = '';
}
if (isset($_GET['add']) && $_GET['add'] == 'link') {
    $post_text = yasDB_clean($_POST['text'], true);
    $post_desc = yasDB_clean($_POST['description'], true);
    $post_url = yasDB_clean($_POST['url']);
    $post_reciprocal = yasDB_clean($_POST['reciprocal']);
    if (empty($post_text) or empty($post_url) or empty($post_reciprocal)) {
        echo "<center>You didn't fill everything out for your link!</center>";
    }
    if ($_POST['recaptcha'] == 'yes') {
        include $setting['sitepath'] . "/includes/securimage/securimage.php";
        $img = new Securimage();
        $valid = $img->check($_POST['code']);
        if (!$valid) {
            $passed = false;
        } else {
            $passed = true;
        }
    } elseif ($_POST['recaptcha'] == 'no') {
        $answer = array('10', 'ten');
        if (!in_array(strtolower($_POST['security']), $answer)) {
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:addlink.php


示例9: db_backup

 function db_backup()
 {
     global $mysqli;
     global $setting;
     $path = $setting['sitepath'] . '/admin/backup/';
     $file = DB_DATABASE . '_' . date("Y-m-d-H-i-s") . '.sql';
     $backupFile = $path . $file;
     if (!is_dir($path)) {
         mkdir($path, 0766);
     }
     chmod($path, 0777);
     $fh = fopen($backupFile, 'w');
     $tab_status = yasDB_select("SHOW TABLE STATUS");
     while ($all = $tab_status->fetch_array(MYSQLI_ASSOC)) {
         $tbl_stat[$all['Name']] = $all['Auto_increment'];
     }
     $backup = '';
     $tables = yasDB_select("SHOW TABLES FROM `" . DB_DATABASE . "`");
     if ($tables->num_rows == 0) {
         return false;
     }
     while ($tabs = $tables->fetch_row()) {
         $droptbl = "DROP TABLE IF EXISTS `" . $tabs[0] . "`;\n";
         $backup .= "--\n-- Table structure for `" . $tabs[0] . "`\n--\n\n" . $droptbl . "\nCREATE TABLE IF NOT EXISTS `" . $tabs[0] . "` (";
         $res = yasDB_select("SHOW CREATE TABLE " . $tabs[0]);
         while ($all = $res->fetch_array(MYSQLI_ASSOC)) {
             $str = str_replace("CREATE TABLE `" . $tabs[0] . "` (", "", $all['Create Table']);
             $str = str_replace(",", ",", $str);
             $str2 = str_replace("`) ) TYPE=MyISAM ", "`)\n ) TYPE=MyISAM ", $str);
             if ($tbl_stat[$tabs[0]] > 0) {
                 $ai = " AUTO_INCREMENT=" . $tbl_stat[$tabs[0]];
             } else {
                 $ai = "";
             }
             $backup .= $str2 . $ai . ";\n\n";
         }
         $backup .= "--\n-- Data to be executed for table `" . $tabs[0] . "`\n--\n\n";
         $limit = yasDB_select("SHOW COLUMNS FROM `" . $tabs[0] . "`");
         $column = $limit->fetch_row();
         $tcount = yasDB_select("SELECT COUNT(" . $column[0] . ") FROM `" . $tabs[0] . "`");
         $total = $tcount->fetch_row();
         $total = $total[0];
         $running = 0;
         while ($running <= $total) {
             $data = yasDB_select("SELECT * FROM `" . $tabs[0] . "` LIMIT " . $running . ",1000");
             $loop = 0;
             $numrows = $data->num_rows;
             while ($dt = $data->fetch_row()) {
                 $loop++;
                 if ($loop == 1) {
                     $backup .= "\nINSERT INTO `{$tabs['0']}` VALUES('" . yasDB_clean($dt[0]) . "'";
                 } else {
                     $backup .= "\t('" . yasDB_clean($dt[0]) . "'";
                 }
                 for ($i = 1; $i < sizeof($dt); $i++) {
                     $backup .= ", '" . yasDB_clean($dt[$i]) . "'";
                 }
                 if ($loop >= $numrows || $loop % 1000 == 0) {
                     $loop = 0;
                     $backup .= ");\n";
                     fwrite($fh, $backup);
                     unset($backup);
                     $backup = '';
                 } else {
                     $backup .= "),\n";
                 }
             }
             $running += 1000;
         }
         $backup .= "\n-- --------------------------------------------------------\n\n";
     }
     fwrite($fh, $backup);
     fclose($fh);
     if ($fh) {
         if (class_exists('ZipArchive')) {
             $zip = new ZipArchive();
             $zipfile = $backupFile . '.zip';
             $compress = $zip->open($zipfile, ZIPARCHIVE::CREATE);
             if ($compress === true) {
                 $zip->addFile($backupFile, $file);
                 $zip->close();
                 if (filesize($zipfile) > 0) {
                     unlink($backupFile);
                     return true;
                 } else {
                     return false;
                 }
             } else {
                 return false;
             }
         }
         return true;
     } else {
         return false;
     }
 }
开发者ID:royalswe,项目名称:yas26,代码行数:96,代码来源:jobs2.php


示例10: yasDB_update

            echo '<center>Files per page must be a number.</center>';
        } else {
            if ($_POST['use'] == 1) {
                $captcha = 'yes';
            } else {
                $captcha = 'no';
            }
            if (!empty($_POST['password']) && $_POST['password'] == $_POST['passwordcheck']) {
                $id = '1';
                yasDB_update("UPDATE settings SET gperpage = " . intval($_POST['gperpage']) . ", numbgames = " . intval($_POST['numbgames']) . ", gamesort = '{$_POST['gamesort']}', approvelinks = '{$_POST['approvelinks']}', numblinks = " . intval($_POST['numblinks']) . ", seo = '{$_POST['seo']}' , lightbox = '{$_POST['lightbox']}', theme = '{$_POST['theme']}', skin = '{$_POST['skin']}', disabled = '{$_POST['disabled']}', regclosed = '{$_POST['regclosed']}', email = '{$_POST['email']}', sitename = '" . yasDB_clean($_POST['sitename']) . "', slogan = '" . yasDB_clean($_POST['slogan']) . "', metades = '" . yasDB_clean($_POST['metades']) . "', metakeywords = '" . yasDB_clean($_POST['metakeywords']) . "',`userecaptcha` = '{$captcha}', `cachelife` = " . intval($_POST['pagecache']) . ", `password` = '" . md5($_POST['password']) . "' where id = '1'");
                include "../includes/settings_function.inc.php";
                createConfigFile();
                echo '<center>Site settings updated!<br />';
                echo '<a href="index.php?act=settings">Click here to proceed.</a></center>';
            } elseif (empty($_POST['password'])) {
                yasDB_update("UPDATE settings SET gperpage = " . intval($_POST['gperpage']) . ", numbgames = " . intval($_POST['numbgames']) . ", gamesort = '{$_POST['gamesort']}', approvelinks = '{$_POST['approvelinks']}', numblinks = " . intval($_POST['numblinks']) . ", seo = '{$_POST['seo']}' , lightbox = '{$_POST['lightbox']}', theme = '{$_POST['theme']}', skin = '{$_POST['skin']}', disabled = '{$_POST['disabled']}', regclosed = '{$_POST['regclosed']}', email = '{$_POST['email']}', sitename = '" . yasDB_clean($_POST['sitename']) . "', slogan = '" . yasDB_clean($_POST['slogan']) . "', metades = '" . yasDB_clean($_POST['metades']) . "', metakeywords = '" . yasDB_clean($_POST['metakeywords']) . "',`userecaptcha` = '{$captcha}', `cachelife` = " . intval($_POST['pagecache']) . "  where id = '1'");
                include "../includes/settings_function.inc.php";
                createConfigFile();
                echo '<center>Site settings updated!<br />';
                echo '<a href="index.php?act=settings"><span style="color:green;">Click here to proceed.</span></a></center>';
            } else {
                echo '<center>Passwords did not match!<br />';
                echo '<a href="index.php?act=settings">Click here to proceed.</a></center>';
            }
        }
    }
} else {
    $query = yasDB_select("SELECT * FROM settings");
    $row = $query->fetch_array(MYSQLI_ASSOC);
    $dir = $setting['sitepath'] . '/templates/';
    $files = scandir($dir);
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:settings.php


示例11: install_fgdgame

function install_fgdgame($gameid)
{
    global $mysqli;
    $query = yasDB_select("SELECT * FROM `fgdfeed` WHERE `id` = '{$gameid}'", false);
    $result = $query->fetch_array(MYSQLI_ASSOC);
    $categories = array('Action' => 2, 'Adventure' => 3, 'Arcade' => 9, 'Defense' => 10, 'Casino' => 6, 'Driving' => 2, 'Fighting' => 2, 'Gadgets' => 10, 'Multiplayer' => 2, 'Puzzle' => 1, 'Rhythm' => 7, 'RPG' => 3, 'Shooter' => 5, 'Sports' => 4, 'Strategy' => 10, 'Other' => 7);
    //Other
    // Download and save game file
    if ($result['gamefile']) {
        $g_url = str_replace("..", "", $result['gamefile']);
        $game_file = basename($g_url);
        $game_file = "fgd_" . $result['uuid'] . "." . GetFileExtension($result['gamefile']);
        $game_url = '../swf/' . $game_file;
        download_file($g_url, $game_url);
    } else {
        return false;
    }
    // Download and save thumbnail pic
    if ($result['thumbfile']) {
        $t_url = str_replace("..", "", $result['thumbfile']);
        $smallthumb = "fgd_" . $result['uuid'] . "." . GetFileExtension($result['thumbfile']);
        $thumb = '../img/' . $smallthumb;
        download_file($t_url, $thumb);
    }
    $desc = yasDB_clean($result['description']);
    // Prep for DB insert
    $gamename = yasDB_clean($result['title']);
    $gamefile = yasDB_clean(str_replace("../", "", $game_url));
    $gamethumb = yasDB_clean(str_replace("../", "", $thumb));
    $tags = yasDB_clean($result['tags']);
    $height = $result['height'];
    $width = $result['width'];
    $c = explode(",", $result['categories']);
    if ($c[0] == "Other" || $c[0] == "Gadgets" || $c[0] == "Rhythm" || $c[0] == "Arcade") {
        $category = getCategory(wordsArray($result['title'] . ' ' . $result['description'] . ' ' . $result['tags']));
    } else {
        $category = $categories[$c[0]];
    }
    $query->close();
    $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '', '{$tags}', '{$gamefile}', {$height}, {$width}, {$category}, 0, '', 'SWF', 'FGD', {$gameid}, '{$gamethumb}', '', '', '','','')", false);
    if (!$query) {
        echo 'Error updating Games database';
        return false;
    }
    $query = yasDB_update("UPDATE fgdfeed SET installed = 1 WHERE id = {$result['id']}", false);
    if (!query) {
        echo 'Error updating fgdfeed database';
        return false;
    }
    return true;
}
开发者ID:royalswe,项目名称:yas26,代码行数:51,代码来源:fgd_functions.php


示例12: elseif

        echo $row['id'];
        ?>
" /><input type="submit" class="button" name="edit" value="Edit!" /></td>
			</tr>
			</form>
			</table>
			</div>
<?php 
    }
} elseif (isset($_POST['edit'])) {
    if (empty($_POST['id']) || empty($_POST['username'])) {
        echo '<center>One or more fields was left empty.<br />';
        echo '<a href="index.php?act=manage_users&edit=' . $_POST['id'] . '">Click here to go back</a></center>';
    } else {
        if (isset($_POST["endban"]) && $_POST["endban"] != '') {
            $endban = yasDB_clean($_POST["endban"]);
            if ($endban != 0) {
                $endban = $endban * 24 * 60 * 60;
                $endban = time() + $endban;
            }
        } else {
            $endban = 0;
        }
        yasDB_update("UPDATE user SET username = '{$_POST['username']}', email = '{$_POST['email']}', website = '{$_POST['website']}', endban = {$endban} \n\t\t\tWHERE id = '{$_POST['id']}'");
        echo '<center>user Successfully edited!<br />';
        echo '<a href="index.php?act=manage_users">Click here to proceed</a></center>';
    }
} elseif (!empty($_GET['reset'])) {
    $query = yasDB_select("SELECT avatar FROM user WHERE id='{$_GET['reset']}'");
    $exists = $query->fetch_array(MYSQLI_ASSOC);
    if ($exists['avatar'] != "") {
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:manage_users.php


示例13: elseif

        echo $row['newsid'];
        ?>
" /><input type="submit" class="button" name="edit" value="Edit!" /><input type="reset" class="button" value="Reset"/></td>
		</tr>
		</table>
		</div>
		</form>		
	<?php 
    }
    $query->close();
} elseif (isset($_POST['edit'])) {
    if (!isset($_POST['username']) || !isset($_POST['comment'])) {
        echo '<center>One or more fields was left empty.<br />';
        echo '<a href="index.php?act=newsblogcomments&edit=' . intval($_POST['id']) . '">Click here to go back</a><center>';
    } else {
        yasDB_update("update newsblog set username = '" . yasDB_clean($_POST['username']) . "', comment = '" . yasDB_clean($_POST['comment']) . "' WHERE id = " . intval($_POST['id']), false);
        echo '<center>Comment Successfully edited!<br />';
        echo '<a href="index.php?act=newsblogcomments">Click here to proceed</a></center>';
    }
} elseif (!empty($_GET['delete'])) {
    $query = yasDB_select("select id from newsblog where id = " . intval($_GET['delete']), false);
    if ($query->num_rows == 0) {
        echo '<center>You cannot delete a members comment that does not exist!<br />';
        echo '<a href="index.php?act=newsblogcomments">Click here to go back</a></center>';
        $query->close();
    } else {
        $query->close();
        yasDB_delete("delete from newsblog where id = " . intval($_GET['delete']), false);
        echo '<center>Members comment successfully deleted.<br />';
        echo '<a href="index.php?act=newsblogcomments">Click here to proceed</a></center>';
    }
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:newsblogcomments.php


示例14: array

<div class="breadcrumbs"><a href="index.php?act=manage_ga" title="Google Analytics">Google Analytics Data</a></div>
</div><br />
<div class="select-bar">
<label>
<h3>Google Analytics Login Info</h3>
</label>
</div>
<?php 
$replace = array('https://', 'http://', 'www.');
$serverUrl = $setting['siteurl'];
$serverUrl = str_replace($replace, "", $serverUrl);
$serverUrl = 'www.' . $serverUrl;
if (isset($_POST['edit_ga'])) {
    $galogin = yasDB_clean($_POST['gaLogin']);
    $gapassword = yasDB_clean($_POST['gaPassword']);
    $gaurl = yasDB_clean($_POST['gaUrl']);
    if ($gapassword == "") {
        $pswd = "";
    } else {
        $pswd = ", `gapassword` = '" . $gapassword . "'";
    }
    yasDB_update("UPDATE `settings` SET `galogin` = '{$galogin}'" . $pswd . ", `gaurl` = '{$gaurl}' WHERE id = 1", false);
    echo '<center>Updated!';
    echo '<br/><a href="index.php?act=gainfo">Click to continue.</a></center>';
} else {
    echo '<br/>';
    $query = yasDB_select("SELECT `galogin`, `gapassword`, `gaurl` FROM `settings` WHERE `id` = 1");
    $social = $query->fetch_array(MYSQLI_ASSOC);
    ?>
	<div class="table">
	<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:gainfo.php


示例15: yasDB_insert

            $name = $_SESSION['user'];
            $ipaddress = $_SERVER['REMOTE_ADDR'];
            yasDB_insert("INSERT INTO `memberscomments` (userid, ipaddress, comment, name) VALUES ({$userid}, '{$ipaddress}', '{$comment}', '{$name}')");
            echo "<h3>Comment added!</h3>";
        }
    } elseif (isset($_POST['newsid'])) {
        $id = yasDB_clean($_POST['newsid']);
        $comment = yasDB_clean($_POST['comment']);
        $ipaddress = yasDB_clean($_SERVER['REMOTE_ADDR']);
        yasDB_insert("INSERT INTO `newsblog` (username, newsid, comment, ipaddress) values ('{$_SESSION['user']}', {$id}, '{$comment}', '{$ipaddress}')", false);
        echo "<h3>Comment added!</h3>";
    } elseif (empty($_POST['gameid'])) {
        echo "<h3>Sorry, the game you were commenting seems to be invalid.</h3>";
        exit;
    } elseif (empty($_POST['comment']) || empty($_POST['name'])) {
        echo "<h3>All fields must filled in.</h3>";
        exit;
    } else {
        $gameid = yasDB_clean($_POST['gameid']);
        $comment = yasDB_clean(strip_tags($_POST['comment']), true);
        $name = yasDB_clean($_POST['name']);
        $ipaddress = yasDB_clean($_SERVER['REMOTE_ADDR']);
        yasDB_insert("INSERT INTO `comments` (gameid, comment, ipaddress, name) VALUES ('{$gameid}', '{$comment}', '{$ipaddress}', '{$name}')", false);
        echo "<h3>Comment added!</h3>";
    }
    //}
} else {
    ?>
	<h3>The security question was answered incorrectly</h3>
	<?php 
}
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:add_comment.php


示例16: yasDB_clean

 $email = yasDB_clean($_POST['email']);
 $location = yasDB_clean($_POST['location']);
 $job = yasDB_clean($_POST['job']);
 $aboutme = yasDB_clean($_POST['aboutme']);
 $hobbies = yasDB_clean($_POST['hobbies']);
 $gender_radio = yasDB_clean($_POST['radio']);
 $month = yasDB_clean($_POST['DateOfBirth_Month']);
 $day = yasDB_clean($_POST['DateOfBirth_Day']);
 $year = yasDB_clean($_POST['DateOfBirth_Year']);
 $shhobs = yasDB_clean($_POST['shhobs']);
 $shloc = yasDB_clean($_POST['shloc']);
 $sheml = yasDB_clean($_POST['sheml']);
 $shname = yasDB_clean($_POST['shname']);
 $shabout = yasDB_clean($_POST['shabout']);
 $deact = yasDB_clean($_POST['deact']);
 $cmtsdisabled = yasDB_clean($_POST['cmtsdisabled']);
 if ($month == "-Month-" || $day == "-Day-" || $year == "-Year-") {
     $birthday = 0;
 } else {
     $birthday = strtotime($day . " " . $month . " " . $year);
 }
 if ($gender_radio == 'female') {
     $gender = 'female';
 } elseif ($gender_radio == 'male') {
     $gender = 'male';
 } else {
     $gender = '';
 }
 if (isset($_SESSION['userid'])) {
     yasDB_update("UPDATE `user` SET website = '{$website}', name = '{$name}', email = '{$email}', location='{$location}', job='{$job}', aboutme='{$aboutme}', hobbies='{$hobbies}', shhobs = '{$shhobs}', cmtsdisabled = '{$cmtsdisabled}', shloc = '{$shloc}',  sheml = '{$sheml}', shname = '{$shname}', shabout = '{$shabout}', deact = '{$deact}', birthday='{$birthday}', gender='{$gender}'  WHERE id = '{$userid}'");
     echo '<h2>Your profile has been updated.</h2>';
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:profile_update.php


示例17: yasDB_clean

<div id="center-column">
<div class="top-bar">
<h1>Cpanel - Ads</h1>
<div class="breadcrumbs"><a href="index.php?act=ads" title="Manage Ads">Manage Ads</a></div>
</div><br />
<div class="select-bar">
<label>
<h3>Add Ads</h3>
</label>
</div>
<?php 
if (isset($_POST['add_ads'])) {
    $name = yasDB_clean($_POST['name']);
    $code = stripslashes($_POST['code']);
    yasDB_insert("INSERT INTO `ads` ( `id` , `name` , `code`) VALUES ('', '" . $name . "', '" . $code . "')", false);
    echo 'Ad added!';
} else {
    ?>
	<div class="table">
		<img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" />
	    <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" />
	    <form name="add_ads" method="post" action="index.php?act=addads">
	    <table class="listing form" cellpadding="0" cellspacing="0">
		<tr>
	    <th class="full" colspan="2">Ads</th>
	    </tr>
		<tr>
		<td class="first" width="172"><strong>Name</strong></td>
		<td class="last"><input type="text" name="name" maxlength="255" /></td>
		</tr>
		<tr class="bg">
开发者ID:royalswe,项目名称:yas26,代码行数:31,代码来源:add_ads.php


示例18: install_konggame

function install_konggame($gameid)
{
    global $mysqli;
    $query = yasDB_select("SELECT * FROM `kongregate` WHERE `id` = '{$gameid}'", false);
    $result = $query->fetch_array(MYSQLI_ASSOC);
    $categories = array('Action' => 2, 'Adventure & RPG' => 3, 'Strategy & Defense' => 10, 'Multiplayer' => 2, 'Puzzle' => 1, 'Rhythm' => 7, 'Shooter' => 5, 'Sports & Racing' => 4, 'Music & More' => 7);
    //Other
    // Download and save game file
    if ($result['file']) {
        $g_url = str_replace("..", "", $result['file']);
        $game_file = basename($g_url);
        $game_file = "kong_" . preg_replace('#\\W#', '', $result['title']) . "." . GetFileExtension($result['file']);
        $game_url = '../swf/' . $game_file;
        download_file($g_url, $game_url);
    } else {
        return false;
    }
    // Download and save thumbnail pic
    if ($result['thumbnail']) {
        $t_url = str_replace("..", "", $result['thumbnail']);
        $smallthumb = "kong_" . preg_replace('#\\W#', '', $result['title']) . "." . GetFileExtension($result['thumbnail']);
        $thumb = '../img/' . $smallthumb;
        download_file($t_url, $thumb);
    }
    $desc = yasDB_clean($result['description']);
    // Prep for DB insert
    $gamename = yasDB_clean($result['title']);
    $gamefile = yasDB_clean(str_replace("../", "", $game_url));
    $gamethumb = yasDB_clean(str_replace("../", "", $thumb));
    $height = $result['height'];
    $width = $result['width'];
    $c = $result['category'];
    $category = $categories[$c];
    $query->close();
    $query = yasDB_insert("INSERT INTO `games` (`id`, `title`, `description`, `instructions`, `keywords`, `file`, `height`, `width`, `category`, `plays`, `code`, `type`, `source`, `sourceid`, `thumbnail`, `thumbnail_200`, `screen1`, `screen2`, `screen3`, `screen4`) VALUES (NULL, '{$gamename}', '{$desc}', '', '', '{$gamefile}', {$height}, {$width}, {$category}, 0, '', 'SWF', 'KONGREGATE', {$gameid}, '{$gamethumb}', '', '', '','','')", false);
    if (!$query) {
        echo 'Error updating Games database';
        return false;
    }
    $query = yasDB_update("UPDATE kongregate SET installed = 1 WHERE id = {$result['id']}", false);
    if (!query) {
        echo 'Error updating kongergate database';
        return false;
    }
    return true;
}
开发者ID:royalswe,项目名称:yas26,代码行数:46,代码来源:kongregate_function.php


示例19: ini_set

<div id="center">
<div class="container_box1">
<div class="header"><center>Unsubscribe</center></div>             
<div class="container_box4">
<center>
<?php 
ini_set("display_errors", 0);
if (isset($_GET['id'])) {
    include_once "../includes/db_functions.inc.php";
    $id = yasDB_clean($_GET['id']);
    $query = yasDB_delete("DELETE FROM notifydown WHERE id ='{$id}'", false);
    if (!$query) {
        echo 'Database error!';
    } else {
        echo 'Your email is deleted from the mailing list.';
    }
}
?>
</center>
</div>
<di 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP yasDB_insert函数代码示例发布时间:2022-05-23
下一篇:
PHP yarpp_get_option函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap