当前位置: 首页>>代码示例>>PHP>>正文


PHP cleanQuery函数代码示例

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


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

示例1: WriteMenu

function WriteMenu($siteid, $siteurl, $sitetarget, $a, $Display, $AdminDisplay)
{
    $DbLink2 = new DB();
    $DbLink2->query("SELECT id,url,target FROM " . C_PAGE_TBL . " Where parent = '" . cleanQuery($siteid) . "' and active='1' and ((display='{$Display}') or (display='2') " . $AdminDisplay . ") ORDER BY rank ASC ");
    if ($siteurl != "") {
        if ($sitetarget == '_self') {
            if ($_GET[btn] == $siteid) {
                echo "<li><a href=\"#\"><span>{$a[$siteid]}</span></a>";
                if ($DbLink2->num_rows() > 0) {
                    echo "<ul>";
                    while (list($siteid2, $siteurl2, $sitetarget2) = $DbLink2->next_record()) {
                        WriteMenu($siteid2, $siteurl2, $sitetarget2, $a, $Display, $AdminDisplay);
                    }
                    echo "</ul>";
                }
                echo "</li>";
            } else {
                echo "<li><a href=\"{$siteurl}&btn={$siteid}\"><span>{$a[$siteid]}</span></a>";
                if ($DbLink2->num_rows() > 0) {
                    echo "<ul>";
                    while (list($siteid2, $siteurl2, $sitetarget2) = $DbLink2->next_record()) {
                        WriteMenu($siteid2, $siteurl2, $sitetarget2, $a, $Display, $AdminDisplay);
                    }
                    echo "</ul>";
                }
                echo "</li>";
            }
        } else {
            if ($sitetarget == '_external') {
                echo "<li><a href=\"{$siteurl}\"><span>{$a[$siteid]}</span></a>";
                if ($DbLink2->num_rows() > 0) {
                    echo "<ul>";
                    while (list($siteid2, $siteurl2, $sitetarget2) = $DbLink2->next_record()) {
                        WriteMenu($siteid2, $siteurl2, $sitetarget2, $a, $Display, $AdminDisplay);
                    }
                    echo "</ul>";
                }
                echo "</li>";
            } else {
                echo "<li><a href=\"#\" onclick=\"window.open('{$siteurl}','mywindow','')\"><span>{$a[$siteid]}</span></a>";
                if ($DbLink2->num_rows() > 0) {
                    echo "<ul>";
                    while (list($siteid2, $siteurl2, $sitetarget2) = $DbLink2->next_record()) {
                        WriteMenu($siteid2, $siteurl2, $sitetarget2, $a, $Display, $AdminDisplay);
                    }
                    echo "</ul>";
                }
                echo "</li>";
            }
        }
    } else {
        echo "<li><a href=\\index.php?&page=smodul&id={$siteid}&btn={$siteid}\"><span>{$a[$siteid]}</span></a></li>";
    }
}
开发者ID:VirtualReality,项目名称:WebUI,代码行数:54,代码来源:menubar.php

示例2: mysqli_query

            $result = mysqli_query($mysqli, $sql);
            if (mysqli_num_rows($result) != 0) {
                echo '<div class="error" id="errorr" >Email Id Already Registered.</div>';
            } else {
                $sql1 = "select * from referrals where email= '" . $email2 . "'";
                $result1 = mysqli_query($mysqli, $sql1);
                if (mysqli_num_rows($result1) != 0) {
                    echo '<div class="error">Email Id Already Reffered.</div>';
                }
            }
        }
    } else {
        if ($email2 != "") {
            echo '<div class="alert">Invalid email Address.</div>';
        }
    }
}
if (isset($_GET['contact'])) {
    $contact2 = cleanQuery($_GET['contact']);
    if ($contact2 == "") {
        //echo '<div class="error">Please type Email ID</div>';
    } else {
        $sql = "select * from  " . $tablename . "   where contact= '" . $contact2 . "'";
        $result = mysqli_query($mysqli, $sql);
        if (mysqli_num_rows($result) == 0) {
            echo '<div class="success">Contact available</div>';
        } else {
            echo '<div class="error">Contact Already Exists</div>';
        }
    }
}
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:check.php

示例3: array

    $smarty->assign('mygroup', '');
}
$action = array();
if (isset($_REQUEST['action']) && is_array($_REQUEST['action'])) {
    $action = $_REQUEST['action'];
} else {
    $action = array();
}
$smarty->assign('action', $action);
$query = array();
if (isset($_REQUEST['query']) && is_array($_REQUEST['query'])) {
    $query = $_REQUEST['query'];
} else {
    $query = array('querypiece' => array());
}
cleanQuery($query);
$query['queryid'] = empty($_SESSION['counter']) ? 0 : $_SESSION['counter'];
$query = prepare_html_query($query);
$config['soapresults'] = !empty($query['collectionid']) && $query['collectionid'] == '-1' ? true : false;
$smarty->assign('config', $config);
if (!$valid_login) {
    $logins->logout();
    $smarty->display($config['skin'] . '/login.tpl');
    exit;
}
$admin = $logins->isInGroup($config['authdomain'], $config['admingroup']);
$editor = $logins->isInGroup($config['authdomain'], $config['editorgroup']);
if ($admin) {
    $editor = true;
}
$user = array('login' => $logins->getUID($config['authdomain']), 'editor' => $editor ? 1 : 0, 'admin' => $admin ? 1 : 0, 'usemygroup' => $admin || ($config['usemygroup'] == 'editor' ? $editor : 0) | $config['usemygroup'] == 'user' ? 1 : 0, 'editgroup' => $admin || ($config['editgroup'] == 'editor' ? $editor : 0) | $config['editgroup'] == 'user' ? 1 : 0, 'insertimage' => $admin || ($config['insertimage'] == 'editor' ? $editor : 0) | $config['insertimage'] == 'user' ? 1 : 0);
开发者ID:BackupTheBerlios,项目名称:dilps,代码行数:31,代码来源:param.inc.php

示例4: array

 //original results (may contain duplicates)
 $bingResultsOrig = array();
 //original results (may contain duplicates)
 $blekkoResults = array();
 //results with duplicates removed
 $googleResults = array();
 //results with duplicates removed
 $bingResults = array();
 //results with duplicates removed
 $aggregatedResults = array();
 //array to store aggregated results in
 $synonyms = array();
 //array to store synonyms retrieved
 //CLEAN THE QUERY STRING FOR SUGGEST WORDS
 $queryEntered = $_POST['query'];
 $cleanedQuery = cleanQuery($queryEntered);
 //******************************************************************************
 //Turn off Warning-reporting for the following warning on CSSERVER:
 //Warning: file_get_contents() [function.file-get-contents]:
 //              SSL: fatal protocol error in ...
 //error_reporting(E_ERROR | E_PARSE);
 error_reporting(0);
 //******************************************************************************
 //******************************************************************************
 //IF WORD SUGGESTIONS HAVE BEEN REQUESTED DISPLAY ALTERNATIVES
 if (isset($_POST['reWrite']) && $_POST['reWrite'] != '') {
     //ONLY WANT THE FIRST WORD FOR OUR LOOKUP
     $firstQueryWord = getFirstWord($cleanedQuery);
     //LOOKUP THE WORD
     getSynonyms($firstQueryWord, $synonyms);
     //INCLUDE PHP FUNCTION WHICH CREATES A FORM BASED ON THE SYNONYM ARRAY
开发者ID:soitun,项目名称:php_software_engineering_project,代码行数:31,代码来源:index.php

示例5: DB

<?php

include "../../settings/config.php";
include "../../settings/databaseinfo.php";
include "../../settings/json.php";
include "../../settings/mysql.php";
include "../../languages/translator.php";
include "../../templates/templates.php";
$DbLink = new DB();
if ($_GET[name]) {
    $userName = $_GET['name'];
    $found = array();
    $found[0] = json_encode(array('Method' => 'GetProfile', 'WebPassword' => md5(WEBUI_PASSWORD), 'Name' => cleanQuery($_GET['name'])));
    $do_post_requested = do_post_request($found);
    $recieved = json_decode($do_post_requested);
    $profileTXT = $recieved->{'profile'}->{'AboutText'};
    $profileImage = $recieved->{'profile'}->{'Image'};
    $created = $recieved->{'account'}->{'Created'};
    $UUID = $recieved->{'account'}->{'PrincipalID'};
    $diff = $recieved->{'account'}->{'TimeSinceCreated'};
    $type = $recieved->{'account'}->{'AccountInfo'};
    $partner = $recieved->{'account'}->{'Partner'};
    $date = date("D d M Y - g:i A", $created);
}
$DbLink->query("SELECT id,\n                         displayTopPanelSlider, \n                         displayTemplateSelector,\n                         displayStyleSwitcher,\n                         displayStyleSizer,\n                         displayFontSizer,\n                         displayLanguageSelector,\n                         displayScrollingText,\n                         displayWelcomeMessage,\n                         displayLogo,\n                         displayLogoEffect,\n                         displaySlideShow,\n                         displayMegaMenu,\n                         displayDate,\n                         displayTime,\n                         displayRoundedCorner,\n                         displayBackgroundColorAnimation,\n                         displayPageLoadTime,\n                         displayW3c,\n                         displayRss FROM " . C_ADMINMODULES_TBL . " ");
list($id, $displayTopPanelSlider, $displayTemplateSelector, $displayStyleSwitcher, $displayStyleSizer, $displayFontSizer, $displayLanguageSelector, $displayScrollingText, $displayWelcomeMessage, $displayLogo, $displayLogoEffect, $displaySlideShow, $displayMegaMenu, $displayDate, $displayTime, $displayRoundedCorner, $displayBackgroundColorAnimation, $displayPageLoadTime, $displayW3c, $displayRss) = $DbLink->next_record();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
开发者ID:VirtualReality,项目名称:WebUI,代码行数:31,代码来源:index.php

示例6: cleanQuery

<?php

include "includes/app_top.php";
$t = cleanQuery($_POST['t']);
$getid = cleanQuery($_POST['id']);
if ($t != "" && $getid != "") {
    $query = "update " . $t . " set userid=0,contactdate='',iscalled=0, vote=0, comments='' where id=" . $getid;
    mysqli_query($mysqli, $query);
    $msg = '<div class="success">Removed User from Contact Status Successfully</div>';
}
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:10,代码来源:delete_item2.php

示例7: checkUserLogin

<?php

include "includes/app_top.php";
checkUserLogin();
if ($action == "send") {
    $message = cleanQuery($_POST['message']);
    $query = "insert into feedback (description,name,email,stateid,datesent) VALUES ('{$message}','" . $_SESSION['user'] . "','" . $_SESSION['useremail'] . "',{$stateid},'{$date}')";
    $a = mysqli_query($mysqli, $query);
    require 'includes/mailer.php';
    $esubject = "AAP Call Campaign - Feedback";
    sendmail($_SESSION['useremail'], $_SESSION["user"], $adminemail, $esubject, "User: " . $_SESSION["user"] . "<br />Email: " . $_SESSION['useremail'] . "<br />Campaign: " . $_SESSION['campaign'] . "<br /><br />" . $message);
    if ($a) {
        tep_redirect("feedback.php?action1=success");
    } else {
        tep_redirect("feedback.php?action1=err");
    }
}
include "includes/styles.php";
?>
<script type="text/javascript" src="../js/ajax.js"></script>
<script src="../js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#volunteer").validate({
              rules: {
						message:"required",
			 }
});});
</script>
</head>
<body class="bgwhite">
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:feedback.php

示例8: cleanQuery

<?php

include 'configure.php';
include 'functions.php';
$id = cleanQuery($_GET['id']);
$iscalled = cleanQuery($_GET['iscalled']);
$query = "update contacts set iscalled=" . $iscalled . "  where id=" . $id;
mysqli_query($mysqli, $query);
$msg = '<div class="success">Updated Call Status</div>';
print $msg;
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:10,代码来源:checkcontact.php

示例9: list

list($UUID, $EMAIL) = $DbLink->next_record();
}

if($UUID)
{	
	$found = array();
	$found[0] = json_encode(array('Method' => 'SaveEmail', 'WebPassword' => md5(WEBUI_PASSWORD)
		, 'UUID' => cleanQuery($UUID)
		, 'Email' => cleanQuery($EMAIL)));
	$do_post_requested = do_post_request($found);
	$recieved = json_decode($do_post_requested);
	
	if ($recieved->{'Verified'} == 1) 
	{
		$WERROR="Thank you, your email address was changed";		
		$DbLink->query("DELETE FROM ".C_CODES_TBL." WHERE code='".cleanQuery($_GET[code])."' and info='emailconfirm'");
	}
}
else
{
	$WERROR="This isnt a valid code or maybe the code was older than 24h";
}
?>

<style type="text/css">
<!--
.Stil1 {
	font-size: 18px;
	font-weight: bold;
}
-->
开发者ID:VirtualReality,项目名称:WebUI,代码行数:31,代码来源:activatemail.php

示例10: mysql_close

    mysql_close($connection);
    $actualizo = 1;
}
///////////////////////////////////////
if ($_POST['editres'] == 0 and $_POST["boton"] == "Submit") {
    $client = $_POST["client"];
    $barrival = $_POST["arrival"];
    $arrival = date("Y-m-d", strtotime($barrival));
    $bdeparture = $_POST["departure"];
    $departure = date("Y-m-d", strtotime($bdeparture));
    $villa = $villaid;
    $owner = $owneridses;
    $estatus = $_POST["estatus"];
    $dateres = date("Y-m-d");
    $staffcomments = cleanQuery($_POST["comments"]);
    $suppliersnote = cleanQuery($_POST["notes"]);
    $emailcontact = $_POST["email"];
    $agencia = $_POST["agencia"];
    if ($_POST["payment1"] != "") {
        $bpago1 = $_POST["payment1"];
        $vpago1 = date("Y-m-d", strtotime($bpago1));
    }
    if ($_POST["payment2"] != "") {
        $bpago2 = $_POST["payment2"];
        $vpago2 = date("Y-m-d", strtotime($bpago2));
    }
    if (is_numeric($_POST["rooms"])) {
        $vrooms = $_POST["rooms"];
    } else {
        $vrooms = "NULL";
    }
开发者ID:raulcastro,项目名称:villaaqua,代码行数:31,代码来源:vabc.php

示例11: getid

<?php

include "includes/app_top.php";
$pcat = "Contacts";
$pagetitle = "Categories";
$getid = getid('id');
checkAdminLogin();
checkState();
if ($action == "addcategory") {
    $query = "insert into categories (catname,state_id,datemodified,volunteer,booth,buzz,`call`,jansabha,donate) VALUE ('" . cleanQuery($_POST['categoryname']) . "','" . cleanQuery($_POST['stateid']) . "','{$date}'," . cleanQuery($_POST['volunteer']) . "," . cleanQuery($_POST['booth']) . "," . cleanQuery($_POST['buzz']) . "," . cleanQuery($_POST['call']) . "," . cleanQuery($_POST['jansabha']) . "," . cleanQuery($_POST['donate']) . ")";
    mysqli_query($mysqli, $query);
    tep_redirect(tep_href_link($pagename, 'action1=add&action=add'));
}
if ($action == "change") {
    $query = "update categories set catname='" . cleanQuery($_POST['categoryname2']) . "',state_id='" . cleanQuery($_POST['stateid2']) . "',datemodified='" . $date . "',volunteer=" . cleanQuery($_POST['volunteer2']) . ",booth=" . cleanQuery($_POST['booth2']) . ",buzz=" . cleanQuery($_POST['buzz2']) . ",`call`=" . cleanQuery($_POST['call2']) . ",jansabha=" . cleanQuery($_POST['jansabha2']) . ",donate=" . cleanQuery($_POST['donate2']) . " where id=" . $getid;
    mysqli_query($mysqli, $query);
    tep_redirect(tep_href_link($pagename, 'action1=update'));
}
include "includes/styles.php";
?>
</head>
<body>
<?php 
include "includes/header.php";
include "includes/side-bar.php";
?>
<div class="pageHeadingBlock ">
        	<div class="grayBackground">
        	<div class="fR t-r spcT_b">            	
                <a onClick="displayadd();"  class="btn btn-primary coursesMenu">Add Category</a>
            </div>
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:categories.php

示例12: checkUserLogin

<?php

include "includes/app_top.php";
$pagetitle2 = "Edit Profile";
checkUserLogin();
if ($action == "edit") {
    $query = "update users set name='" . cleanQuery($_POST['name']) . "', gender='" . cleanQuery($_POST['gender']) . "', state='" . cleanQuery($_POST['state']) . "', phone='" . cleanQuery($_POST['phone']) . "',city='" . cleanQuery($_POST['city']) . "',country='" . cleanQuery($_POST['country']) . "',countrycode='" . cleanQuery($_POST['countrycode']) . "', catid=" . cleanQuery($_POST['category']) . " where id=" . $_SESSION['userid'];
    $a = mysqli_query($mysqli, $query);
    if ($a) {
        $_SESSION['usercatid'] = cleanQuery($_POST['category']);
        $_SESSION['getcontact'] = '';
        tep_redirect(tep_href_link($pagename, 'action1=success'));
    } else {
        tep_redirect(tep_href_link($pagename, 'action1=err'));
    }
}
include "includes/styles.php";
include "../includes/colorbox.php";
?>
<script src="../js/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
                  checkstudent();
                  $("#signup").validate({
                                        rules: {
                                        name:"required",
                                        gender: "required",
                                        phone: "required",
                                        }
                                        });
                  });
开发者ID:AamAadmiParty,项目名称:emc3,代码行数:31,代码来源:edit-profile.php

示例13: user_details

function user_details($user) {		/*Returns details of an user*/
	$user = cleanQuery($user);
	$sql = "SELECT * FROM users 
	WHERE username='$user'";
	//echo $sql;
	$result = mysql_query($sql);
	if (!$result) echo mysql_error();
	$row = mysql_fetch_assoc($result);
	if (is_array($row)) {
		return $row;
	} else {
		return;
	}
}
开发者ID:nargotik,项目名称:Cultural-Test,代码行数:14,代码来源:site_functions.php

示例14: cleanQuery

    $DbLink->query("UPDATE " . C_ADMINBGCOLORANIM_TBL . " SET Colors = '" . cleanQuery($_POST["ColorHoverStep8"]) . "' WHERE Steps = 'HoverStep8'");
}
if ($_POST[EndStep8] == "{$webui_admin_options_modify}") {
    $DbLink->query("UPDATE " . C_ADMINBGCOLORANIM_TBL . " SET Colors = '" . cleanQuery($_POST["ColorEndStep8"]) . "' WHERE Steps = 'EndStep8'");
}
if ($_POST[HoverStep9] == "{$webui_admin_options_modify}") {
    $DbLink->query("UPDATE " . C_ADMINBGCOLORANIM_TBL . " SET Colors = '" . cleanQuery($_POST["ColorHoverStep9"]) . "' WHERE Steps = 'HoverStep9'");
}
if ($_POST[EndStep9] == "{$webui_admin_options_modify}") {
    $DbLink->query("UPDATE " . C_ADMINBGCOLORANIM_TBL . " SET Colors = '" . cleanQuery($_POST["ColorEndStep9"]) . "' WHERE Steps = 'EndStep9'");
}
if ($_POST[HoverStep10] == "{$webui_admin_options_modify}") {
    $DbLink->query("UPDATE " . C_ADMINBGCOLORANIM_TBL . " SET Colors = '" . cleanQuery($_POST["ColorHoverStep10"]) . "' WHERE Steps = 'HoverStep10'");
}
if ($_POST[EndStep10] == "{$webui_admin_options_modify}") {
    $DbLink->query("UPDATE " . C_ADMINBGCOLORANIM_TBL . " SET Colors = '" . cleanQuery($_POST["ColorEndStep10"]) . "' WHERE Steps = 'EndStep10'");
}
// For Color
$DbLink->query("SELECT id, Options , Steps, Colors, Display FROM " . C_ADMINBGCOLORANIM_TBL . " ");
list($id, $Options, $Steps, $Colors, $displayBackgroundColorAnimation) = $DbLink->next_record();
?>

<div id="content">
  <div id="ContentHeaderLeft"><h5><?php 
echo SYSNAME;
?>
</h5></div>
  <div id="ContentHeaderCenter"></div>
  <div id="ContentHeaderRight"><h5><? echo $webui_admin_options; ?></h5></div>
  <div id="adminsettings">
  <div id="info"><p><? echo $webui_admin_options_info; ?> $displayBackgroundColorAnimation </p></div>
开发者ID:VirtualReality,项目名称:WebUI,代码行数:31,代码来源:bgcolanim.php

示例15: json_encode

         $response['arrayContent'][$i] = json_encode($response['arrayContent'][$i]);
     }
     $response['content']['mgs'] = encode_tojson($type . '_updated');
     $response['content']['hasArray'] = encode_tojson($i);
 }
 if (@$_POST['action'] == 'upload_perfil') {
     $_POST['usuarios_id'];
     //subir imagen del perro
     $image_name = upload_image('fileUpload', str_replace('.png', '', $_POST['usuario_foto']));
     db_update('usuarios', array('foto' => $image_name), array('id' => $_POST['usuarios_id']));
     $response['content']['mgs'] = 'imagen cargada correctamente';
 }
 if (@$_POST['action'] == 'get_updates') {
     $_POST['serverupdate'];
     $_POST['table'];
     $type = cleanQuery($_POST['table']);
     $where = array('serverupdate > ' => $_POST['serverupdate']);
     /*if($type == 'respuestas_usuarios' || $type == 'notificaciones' || $type == 'videos_usuarios_empresas'){
           $where['usuarios_id'] = $_POST['usuarios_id'];
       }*/
     $empresasData2 = array();
     $empresasData = get($type, '*', $where);
     $i = 0;
     if (!empty($empresasData)) {
         foreach ($empresasData as $dada) {
             $i++;
             $empresasData2[$i] = array();
             //p($dada);
             foreach ($dada as $dada2_key => $dada2_val) {
                 //$empresasData2[$i][$dada2_key] = mb_convert_encoding($dada2_val, "UTF-8", "HTML-ENTITIES");
                 //p($dada2);
开发者ID:georgex1,项目名称:bp-unity-nuevo-proyecto,代码行数:31,代码来源:response.php


注:本文中的cleanQuery函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。