100+ results for 'php addslashes'
Not the results you expected?
meta.php (https://github.com/WordPress/wordpress-develop.git) PHP · 349 lines
Action.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 162 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
104 if (isset($action['confirm'])) {
105 $action['onclick'] = 'return window.confirm(\'' . addslashes(
106 $this->escapeHtml($action['confirm'])
107 ) . '\')';
120 * @param \Magento\Framework\DataObject $row
121 * @return $this
122 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
123 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
HTTPConditionalGetTest.php (https://github.com/soitun/minify.git) PHP · 150 lines
slideshow.tpl (https://github.com/smadi/arabian-land.git) Smarty Template · 141 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
6 <?php } ?>
13 <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
14 <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
15 </div>
16 <div class="content">
36 <?php if ($banner['banner_id'] == $module['banner_id']) { ?>
37 <option value="<?php echo $banner['banner_id']; ?>" selected="selected"><?php echo $banner['name']; ?></option>
38 <?php } else { ?>
111 <?php foreach ($banners as $banner) { ?>
112 html += ' <option value="<?php echo $banner['banner_id']; ?>"><?php echo addslashes($banner['name']); ?></option>';
113 <?php } ?>
117 <?php foreach ($layouts as $layout) { ?>
118 html += ' <option value="<?php echo $layout['layout_id']; ?>"><?php echo addslashes($layout['name']); ?></option>';
119 <?php } ?>
medias.php (https://github.com/bashofmann/partuza.git) PHP · 244 lines
34 $adds[] = "`" . $db->addslashes($key) . "` = null";
35 } else {
36 $adds[] = "`" . $db->addslashes($key) . "` = '" . $db->addslashes($val) . "'";
37 }
38 }
87 $owner_id = $db->addslashes($owner_id);
88 $album_id = $db->addslashes($album_id);
89 $start = $db->addslashes($start);
150 $updates[] = "`" . $db->addslashes($key) . "` = null";
151 } else {
152 $updates[] = "`" . $db->addslashes($key) . "` = '" . $db->addslashes($val) . "'";
153 }
154 }
182 public function delete_media($owner_id, $media_id) {
183 global $db;
184 $query = "delete from media_items where owner_id = '" . $db->addslashes($owner_id) .
185 "' and id = '" . $db->addslashes($media_id) ."'";
index.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 152 lines
1 <?php
3 /**
5 * This is NOT a freeware, use is subject to license terms
6 *
7 * $Id: index.php 27617 2012-02-07 08:24:14Z monkey $
8 */
16 $domain = $_ENV = array();
17 $jump = false;
18 @include_once './data/sysdata/cache_domain.php';
19 $_ENV['domain'] = $domain;
20 if(empty($_ENV['domain'])) {
21 $_ENV['curapp'] = 'forum';
22 } else {
23 $_ENV['defaultapp'] = array('portal.php' => 'portal', 'forum.php' => 'forum', 'group.php' => 'group', 'home.php' => 'home');
24 $_ENV['hostarr'] = explode('.', $_SERVER['HTTP_HOST']);
25 $_ENV['domainroot'] = substr($_SERVER['HTTP_HOST'], strpos($_SERVER['HTTP_HOST'], '.')+1);
referrer.php (https://gitlab.com/karlen/ayo_wp) PHP · 92 lines
12 <?php foreach ( $themes as $theme_key => $theme_name ): ?>
13 referrer_themes['<?php echo addslashes( $theme_key ); ?>'] = '<?php echo addslashes( $theme_name ); ?>';
14 <?php endforeach; ?>
35 </th>
36 <td>
37 <span class="referrer_group_number"><?php echo $index; ?>.</span> <span class="referrer_group"><?php echo htmlspecialchars( $group ); ?></span> <input type="button" class="button referrer_delete" value="<?php _e( 'Delete group', 'w3-total-cache' ); ?>" />
38 </td>
39 </tr>
66 </th>
67 <td>
68 <input id="referrer_groups_<?php echo esc_attr( $group ); ?>_redirect" type="text" name="referrer_groups[<?php echo esc_attr( $group ); ?>][redirect]" value="<?php echo esc_attr( $group_config['redirect'] ); ?>" size="60" />
69 <br /><span class="description"><?php _e( 'A 302 redirect is used to send this group of referrers to another hostname (domain).', 'w3-total-cache' ); ?></span>
75 </th>
76 <td>
77 <textarea id="referrer_groups_<?php echo esc_attr( $group ); ?>_referrers" name="referrer_groups[<?php echo esc_attr( $group ); ?>][referrers]" rows="10" cols="50"><?php echo esc_textarea( implode( "\r\n", (array) $group_config['referrers'] ) ); ?></textarea>
78 <br /><span class="description"><?php _e( 'Specify the referrers for this group. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?></span>
setup.php (https://github.com/fryed/Brick_cms.git) PHP · 212 lines
1 <?php
3 //-----CHECKS FOR DATABASE AND INIT SETUP IF NOT FOUND-----//
52 $SETUP->debugging = false;
53 $SETUP->template_dir = "system/admin_templates";
54 $SETUP->compile_dir = "system/lib/php/smarty/compile";
56 //get page url
73 $this->setupDB();
75 //catch all php errors
76 $phpErrors = $this->ERRORS->getErrors();
78 //loop errors and convert mysql user error to more readable error
79 $i = 0;
80 foreach($phpErrors as $error){
81 $this->setupErrors[] = $error;
82 }
Action.php (https://gitlab.com/daigiangaitu91/magento) PHP · 162 lines
1 <?php
2 /**
3 * Copyright © 2015 Magento. All rights reserved.
104 if (isset($action['confirm'])) {
105 $action['onclick'] = 'return window.confirm(\'' . addslashes(
106 $this->escapeHtml($action['confirm'])
107 ) . '\')';
120 * @param \Magento\Framework\DataObject $row
121 * @return $this
122 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
123 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
Location.php (https://github.com/ksecor/civicrm.git) PHP · 198 lines
1 <?php
3 /*
167 $location = array( );
168 $location['contactID' ] = $dao->contact_id;
169 $location['displayName'] = addslashes( $dao->display_name );
170 $location['city' ] = $dao->city;
171 $location['state' ] = $dao->state;
184 CRM_Utils_String::append( $address, '<br /> ',
185 array( $dao->country ) );
186 $location['address' ] = addslashes( $address );
187 $location['displayAddress'] = str_replace( '<br />', ', ', $address );
188 $location['url' ] = CRM_Utils_System::url( 'civicrm/contact/view', 'reset=1&cid=' . $dao->contact_id );
189 $location['location_type' ] = $dao->location_type;
190 require_once 'CRM/Contact/BAO/Contact/Utils.php';
191 $location['image'] =
192 CRM_Contact_BAO_Contact_Utils::getImage( $dao->contact_sub_type ?
Db.class.php (https://github.com/liu21st/thinkphp.git) PHP · 193 lines
1 <?php
3 // +----------------------------------------------------------------------
4 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
5 // +----------------------------------------------------------------------
6 // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
154 $hander = is_array($this->hander) ? $this->hander[0] : $this->hander;
155 $expire = time() + $this->lifeTime;
156 $sessData = addslashes($sessData);
157 mysql_query('REPLACE INTO ' . $this->sessionTable . " ( session_id, session_expire, session_data) VALUES( '$sessID', '$expire', '$sessData')", $hander);
158 if (mysql_affected_rows($hander)) {
monthcategories.php (http://php-personal-budget.googlecode.com/svn/trunk/) PHP · 155 lines
32 <?php } ?>
34 <td width="25px"><img src="/resources/icons/cross.png" style="cursor: pointer" onclick="delete_category(<?=$id?>, '<?=addslashes($category["category_pretty_name"])?>');" title="Delete <?=$category["category_pretty_name"]?>" /></td>
35 <?php
46 }
47 ?>
48 <td width="25px"><img src="/resources/icons/folder_edit.png" style="cursor: pointer" onclick="enableRenameCategoryDialog(<?=$id?>, '<?=addslashes($category["category_pretty_name"])?>');" title="Rename <?=addslashes($category["category_pretty_name"])?>" /></td>
49 <?php } ?>
60 ?>
61 <span style='color: red'>$<?=number_format($category['budget_amount'] - $trans_total, 2)?></span>
62 <?php
63 } else if (($category['budget_amount'] - $trans_total) > 0){
64 ?>
75 <td width="300px" style='text-align: right'>
76 <p id="cat_<?=$id?>" style="text-align: right;">
77 <?php
78 if (isset($category['budget_amount'])) {
79 ?>
BaseBuilder.php (https://github.com/cedriclombardot/TwigGenerator.git) PHP · 303 lines
GuidelineGroupsDAO.class.php (https://github.com/atutor/AChecker.git) PHP · 327 lines
1 <?php
2 /************************************************************************/
3 /* AChecker */
21 if (!defined('AC_INCLUDE_PATH')) exit;
23 require_once(AC_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
24 require_once(AC_INCLUDE_PATH. 'classes/Utility.class.php');
39 public function Create($guidelineID, $name, $abbr, $principle)
40 {
41 global $addslashes;
43 $guidelineID = intval($guidelineID);
44 $name = trim($name); // $addslashes is not necessary as it's called in LanguageTextDAO->Create()
45 $abbr = $addslashes(trim($abbr));
step_3.php (https://bitbucket.org/jojoluzifer/gold-light-project.git) PHP · 256 lines
32 $output .= 'define(\'DB_HOSTNAME\', \'' . addslashes($this->request->post['db_host']) . '\');' . "\n";
33 $output .= 'define(\'DB_USERNAME\', \'' . addslashes($this->request->post['db_user']) . '\');' . "\n";
34 $output .= 'define(\'DB_PASSWORD\', \'' . addslashes($this->request->post['db_password']) . '\');' . "\n";
67 $output .= '// DB' . "\n";
68 $output .= 'define(\'DB_DRIVER\', \'' . addslashes($this->request->post['db_driver']) . '\');' . "\n";
69 $output .= 'define(\'DB_HOSTNAME\', \'' . addslashes($this->request->post['db_host']) . '\');' . "\n";
241 if (!is_writable(DIR_OPENCART . 'config.php')) {
242 $this->error['warning'] = 'Error: Could not write to config.php please check you have set the correct permissions on: ' . DIR_OPENCART . 'config.php!';
243 }
245 if (!is_writable(DIR_OPENCART . 'admin/config.php')) {
246 $this->error['warning'] = 'Error: Could not write to config.php please check you have set the correct permissions on: ' . DIR_OPENCART . 'admin/config.php!';
247 }
relation_cleanup.lib.php (https://gitlab.com/qbarbosa/klindev) PHP · 295 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Set of functions used for cleaning up phpMyAdmin tables
5 *
6 * @package PhpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
10 }
26 $remove_query = 'DELETE FROM ' . PMA_Util::backquote($cfgRelation['db'])
27 . '.' . PMA_Util::backquote($cfgRelation['column_info'])
28 . ' WHERE db_name = \'' . PMA_Util::sqlAddSlashes($db) . '\''
29 . ' AND table_name = \'' . PMA_Util::sqlAddSlashes($table) . '\''
gateway.php (https://github.com/m0n0ph1/malware-1.git) PHP · 185 lines
1 <?php
3 function _xor($src,$key) {
41 }
43 include ("config.php");
45 //////////START/////////////////////////
77 if(!empty($_POST["opt"])) { $Idle = DecodeDecrypt($_POST["opt"],$Key); } else { $Idle = ' '; }
78 if(!empty($_POST["var"])) { $Version = DecodeDecrypt($_POST["var"],$Key); } else { $Version = ' '; }
79 if(!empty($_POST["view"])) { $ProcList = DecodeDecrypt($_POST["view"],$Key); $ProcList = addslashes($ProcList); } else { $ProcList = ' '; }
80 if(empty($_POST["ip"])) { $RemoteIP = $_SERVER['REMOTE_ADDR']; } else { $RemoteIP = $_POST["ip"]; }
81 if(empty($_SERVER['HTTP_USER_AGENT'])) { $UserAgent = 'User-Agent: Not Captured'; } else { $UserAgent = $_SERVER['HTTP_USER_AGENT']; }
93 if(!empty($_POST["ump"])) {
94 $Dumps = DecodeDecrypt($_POST["ump"],$Key);
95 $Dumps = addslashes($Dumps);
96 $insert = "INSERT INTO`" . $dbname . "`.`logs` (`UID` ,`Dumps` )VALUES ('$UID','$Dumps')";
97 mysql_query($insert);
TXT.php (https://github.com/BenBE/ispCP.git) PHP · 112 lines
1 <?php
2 /**
3 * License Information:
4 *
5 * Net_DNS: A resolver library for PHP
6 * Copyright (c) 2002-2003 Eric Kilfoil eric@ypass.net
7 * Maintainers:
8 * Marco Kaiser <bate@php.net>
9 * Florian Anderiasch <fa@php.net>
10 *
11 * PHP versions 4 and 5
12 *
13 * LICENSE: This source file is subject to version 3.01 of the PHP license
Links.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 241 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Page
23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
194 $result = '';
195 foreach ($params as $key=>$value) {
196 $result .= ' ' . $key . '="' . addslashes($value) . '"';
197 }
198 return $result;
LiquidStandardFilters.class.php (git://github.com/harrydeluxe/php-liquid.git) PHP · 310 lines
1 <?php
2 /**
3 * A selection of standard filters
5 * @package Liquid
6 * @copyright Copyright (c) 2011-2012 Harald Hanek,
7 * fork of php-liquid (c) 2006 Mateo Murphy,
8 * based on Liquid for Ruby (c) 2006 Tobias Luetke
9 * @license http://harrydeluxe.mit-license.org
84 public static function escape($input)
85 {
86 return is_string($input) ? addslashes($input) : $input;
87 }
DAO.php (https://github.com/midnightskinhead/OSClass.git) PHP · 265 lines
rss.php (https://gitlab.com/BGCX261/zillatek-project-svn-to-git.git) PHP · 238 lines
1 <?php if( ! defined('BASEPATH')) exit('No direct script access allowed');
3 /**
34 {
35 // Get the modules config file
36 include APPPATH . 'config/modules.php';
38 // Get the module URI segment
50 /**
51 * Saves the config.php settings
52 *
53 * @access public
74 // Try to change the setting
75 if($this->config_model->change('config.php', $field, addslashes($setting), 'Rss') == FALSE)
76 {
77 // Error message
module_prefs.php (https://github.com/radiocontrolled/ATutor.git) PHP · 94 lines
1 <?php
2 define('AT_INCLUDE_PATH', '../../../../include/');
3 require(AT_INCLUDE_PATH.'vitals.inc.php');
4 admin_authenticate(AT_ADMIN_PRIV_ADMIN);
5 require(AT_INCLUDE_PATH.'header.inc.php');
7 $key = $_config['gsearch'];
13 $_GET['gtype'] = trim($_GET['gtype']);
14 if ($_GET['keyIsValidated']=='true'){
15 $key = $addslashes($_GET['key']);
16 $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES('gsearch','$key')";
17 $result = mysql_query($sql, $db);
31 if (isset($_POST['submit'])) {
32 require('../SOAP_Google.php');
33 $_POST['key'] = trim($_POST['key']);
34 $_POST['gtype'] = trim($_POST['gtype']);
shared.php (https://github.com/aimakun/odlib.git) PHP · 115 lines
28 <a href="../catalog/biblio_hold_list.php?bibid=<?php echo HURL($bibid);?>" class="alt1"><?php echo $navLoc->getText("catalogHolds");?></a><br>
29 <a href="../catalog/biblio_del_confirm.php?bibid=<?php echo HURL($bibid);?>&title=<?php echo HURL($title);?>" class="alt1"><?php echo $navLoc->getText("catalogDelete");?></a><br>
30 <?php } ?>
76 <a href="../catalog/biblio_hold_list.php?bibid=<?php echo HURL($bibid);?>" class="alt1"><?php echo $navLoc->getText("catalogHolds");?></a><br>
77 <a href="../catalog/biblio_del_confirm.php?bibid=<?php echo HURL($bibid);?>&title=<?php echo HURL($title);?>" class="alt1"><?php echo $navLoc->getText("catalogDelete");?></a><br>
78 <?php } ?>
86 <a href="../catalog/biblio_hold_list.php?bibid=<?php echo HURL($bibid);?>" class="alt1"><?php echo $navLoc->getText("catalogHolds");?></a><br>
87 <a href="../catalog/biblio_del_confirm.php?bibid=<?php echo HURL($bibid);?>&title=<?php echo HURL($title);?>" class="alt1"><?php echo $navLoc->getText("catalogDelete");?></a><br>
88 <?php } ?>
95 » <?php echo $navLoc->getText("catalogHolds");?><br>
96 <a href="../catalog/biblio_del_confirm.php?bibid=<?php echo HURL($bibid);?>&title=<?php echo HURL($title);?>" class="alt1"><?php echo $navLoc->getText("catalogDelete");?></a><br>
97 <?php } ?>
115 <a href="javascript:popSecondary('../shared/help.php<?php if (isset($helpPage)) echo "?page=".H(addslashes(U($helpPage))); ?>')"><?php echo $navLoc->getText("help");?></a>
group.php (https://bitbucket.org/icosplays/friendica.git) PHP · 235 lines
1 <?php
3 function validate_members(&$item) {
7 function group_init(&$a) {
8 if(local_user()) {
9 require_once('include/group.php');
10 $a->page['aside'] = group_side('contacts','group',false,(($a->argc > 1) ? intval($a->argv[1]) : 0));
11 }
132 if(($a->argc > 1) && (intval($a->argv[1]))) {
134 require_once('include/acl_selectors.php');
135 $r = q("SELECT * FROM `group` WHERE `id` = %d AND `uid` = %d AND `deleted` = 0 LIMIT 1",
136 intval($a->argv[1]),
196 );
198 $sec_token = addslashes(get_form_security_token('group_member_change'));
199 $textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : false);
200 foreach($members as $member) {
GuidelineSubgroupsDAO.class.php (https://github.com/atutor/AChecker.git) PHP · 308 lines
1 <?php
2 /************************************************************************/
3 /* AChecker */
21 if (!defined('AC_INCLUDE_PATH')) exit;
23 require_once(AC_INCLUDE_PATH. 'classes/DAO/DAO.class.php');
24 require_once(AC_INCLUDE_PATH. 'classes/Utility.class.php');
38 public function Create($groupID, $name, $abbr)
39 {
40 global $addslashes;
42 $groupID = intval($groupID);
43 $name = trim($name); // $addslashes is not necessary as it's called in LanguageTxetDAO->Create()
44 $abbr = $addslashes(trim($abbr));
listGridCMS_PROJECTS.php (https://github.com/juddy/GIP.git) PHP · 309 lines
1 <?php
2 include_once("../common/dbConnection.php");
3 include_once("../common/header.php");
4 ?>
5 <?
9 {
10 // Retreiving Form Elements from Form
11 $thisPROJECT_ID = addslashes($_REQUEST['thisPROJECT_IDField']);
12 $thisPROJECT_NAME = addslashes($_REQUEST['thisPROJECT_NAMEField']);
13 $thisPROJECT_DESCRIPTION = addslashes($_REQUEST['thisPROJECT_DESCRIPTIONField']);
14 $thisPROJECT_FLAGS = addslashes($_REQUEST['thisPROJECT_FLAGSField']);
15 $thisPROJECT_TYPE = addslashes($_REQUEST['thisPROJECT_TYPEField']);
16 $thisUSER_ID = addslashes($_REQUEST['thisUSER_IDField']);
bestseller.tpl (https://bitbucket.org/deringer/opencart.git) Smarty Template · 130 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
6 <?php } ?>
13 <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
14 <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a></div>
15 </div>
16 <div class="content">
32 <tbody id="module-row<?php echo $module_row; ?>">
33 <tr>
34 <td class="left"><input type="text" name="bestseller_module[<?php echo $module_row; ?>][limit]" value="<?php echo $module['limit']; ?>" size="1" /></td>
35 <td class="left"><input type="text" name="bestseller_module[<?php echo $module_row; ?>][image_width]" value="<?php echo $module['image_width']; ?>" size="3" />
80 <td class="right"><input type="text" name="bestseller_module[<?php echo $module_row; ?>][sort_order]" value="<?php echo $module['sort_order']; ?>" size="3" /></td>
81 <td class="left"><a onclick="$('#module-row<?php echo $module_row; ?>').remove();" class="button"><?php echo $button_remove; ?></a></td>
82 </tr>
83 </tbody>
106 <?php foreach ($layouts as $layout) { ?>
107 html += ' <option value="<?php echo $layout['layout_id']; ?>"><?php echo addslashes($layout['name']); ?></option>';
108 <?php } ?>
format.php (https://bitbucket.org/ciceidev/cicei_moodle_conditional_activities.git) PHP · 432 lines
9 ////////////////////////////////////////////////////////////////////////////
11 // Based on default.php, included by ../import.php
12 /**
13 * @package questionbank
16 require_once ("$CFG->libdir/xmlize.php");
17 require_once ("$CFG->libdir/tcpdf/html_entity_decode_php4.php");
19 class qformat_blackboard extends qformat_default {
217 $question->fraction[$j] = 1;
218 if ($ishtml) {
219 $question->feedback[$j] = html_entity_decode_php4(trim(@$thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_CORRECT"][0]["#"]));
220 }
221 $question->feedback[$j] = addslashes($question->feedback[$j]);
225 $question->feedback[$j] = html_entity_decode_php4(trim(@$thisquestion["#"]["GRADABLE"][0]["#"]["FEEDBACK_WHEN_INCORRECT"][0]["#"]));
226 }
227 $question->feedback[$j] = addslashes($question->feedback[$j]);
228 }
229 }
Organisme.php (https://gitlab.com/r.collas/site_central) PHP · 260 lines
1 <?php
3 class Controller_Fsn_Organisme extends Yab_Controller_Action {
38 // Control champs requis
39 function isNumber($idElt, &$formvalue, &$form, &$errors_messages, $message){
40 $eltvalue = addslashes($formvalue[$idElt]);
41 if(!empty($eltvalue)){
42 if($form->getElement($idElt)->getErrors()) $errors_messages[$idElt] = $message;
44 }
45 function isUnique($idElt, &$formvalue, &$fsn_organisme, &$errors_messages, $message){
46 $eltvalue = addslashes($formvalue[$idElt]);
47 if(!empty($eltvalue)){
48 $req = $fsn_organisme->fetchAll()->where(addslashes($idElt).' ="'.$eltvalue.'" ');
117 // Control champs requis
118 function isNumber($idElt, &$formvalue, &$form, &$errors_messages, $message){
119 $eltvalue = addslashes($formvalue[$idElt]);
120 if(!empty($eltvalue)){
121 if($form->getElement($idElt)->getErrors()) $errors_messages[$idElt] = $message;
string functions.php (https://gitlab.com/naznin/Naznin_151485_B33_session4) PHP · 153 lines
Set.php (https://github.com/bblc/tomatocms208v1.git) PHP · 227 lines
1 <?php
2 /**
3 * TomatoCMS
15 * @copyright Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
16 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
17 * @version $Id: Set.php 5152 2010-08-30 07:25:57Z huuphuoc $
18 * @since 2.0.5
19 */
94 }
95 if (isset($exp['keyword'])) {
96 $where[] = "s.title LIKE '%" . addslashes($exp['keyword']) . "%'";
97 }
98 if (isset($exp['is_active'])) {
128 }
129 if (isset($exp['keyword'])) {
130 $where[] = "s.title LIKE '%" . addslashes($exp['keyword']) . "%'";
131 }
132 if (isset($exp['is_active'])) {
menudelete.php (https://github.com/nadavkav/MoodleTAO.git) PHP · 109 lines
1 <?php // $Id: menudelete.php,v 1.1.10.1 2008/03/23 09:36:06 julmis Exp $
3 // This page deletes selected menu.
5 require_once("../config.php");
6 include_once('cmslocallib.php');
38 $navlinks = array();
39 $navlinks[] = array('name' => $strcms.' '.$stradministration, 'link' => "index.php?course=$course->id&sesskey=$USER->sesskey", 'type' => 'misc');
40 $navlinks[] = array('name' => $strdeletemenu, 'link' => "", 'type' => 'misc');
41 $navigation = build_navigation($navlinks);
46 // User pushed cancel button.
47 if ( !empty($menu->cancel) ) {
48 redirect("menus.php?course=$courseid&sesskey=$USER->sesskey");
49 }
search.php (https://github.com/cdjflxk/ecshop_flxk.git) PHP · 113 lines
1 <?php
2 /**
3 *
4 * 搜索页
5 *
6 * @version $Id: search.php 1 15:38 2010年7月8日Z tianya $
7 * @package DedeCMS.Site
8 * @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
10 * @link http://www.dedecms.com
11 */
12 require_once(dirname(__FILE__)."/../include/common.inc.php");
13 require_once(DEDEINC."/arc.searchview.class.php");
40 {
41 $fp = fopen(DEDEDATA.'/cache/typename.inc', 'w');
42 fwrite($fp, "<"."?php\r\n");
43 $dsql->SetQuery("Select id,typename,channeltype From `#@__arctype`");
44 $dsql->Execute();
toolbar.php (https://github.com/projectfork/Projectfork.git) PHP · 294 lines
1 <?php
2 /**
3 * @package Projectfork.Library
227 if ($list) {
228 $message = addslashes(JText::_('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'));
229 $html[] = "if (document.adminForm.boxchecked.value==0){alert('$message');}else{Joomla.submitbutton('$task')}";
230 }
239 $html[] = '>';
240 $html[] = '<i class="' . $icon . '"></i> ';
241 $html[] = addslashes(JText::_($text));
242 $html[] = '</a>';
271 if ($list) {
272 $message = addslashes(JText::_('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'));
273 $html[] = "if (document.adminForm.boxchecked.value==0){alert('$message');}else{Joomla.submitbutton('$task')}";
274 }
Configurator.php (https://gitlab.com/mautic-master/mautic) PHP · 314 lines
1 <?php
2 /**
3 * @package Mautic
216 public function render()
217 {
218 $string = "<?php\n";
219 $string .= "\$parameters = array(\n";
222 if ($value !== '') {
223 if (is_string($value)) {
224 $value = "'" . addslashes($value) . "'";
225 } elseif (is_bool($value)) {
226 $value = ($value) ? 'true' : 'false';
262 $string .= $this->renderArray($value, $level + 1);
263 } else {
264 $string .= '"'.addslashes($value).'"';
265 }
smarty_internal_compile_private_print_expression.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 156 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Compile Print Expression
53 if (isset($_attr['assign'])) {
54 // assign output to variable
55 $output = "<?php \$_smarty_tpl->assign({$_attr['assign']},{$parameter['value']});?>";
56 } else {
57 // display value
82 // autoescape html
83 if ($compiler->template->smarty->escape_html) {
84 $output = "htmlspecialchars({$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
85 }
86 // loop over registered filters
123 $compiler->has_output = true;
124 $output = "<?php echo {$output};?>";
125 }
Form.php (https://gitlab.com/inglobe/mgt-clemente-css) PHP · 216 lines
1 <?php
3 class AW_Blog_Block_Manage_Blog_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
22 $noticeMessage = Mage::helper('blog')->__('e.g. domain.com/blog/<b>identifier</b>');
24 $validationErrorMessage = addslashes(
25 Mage::helper('blog')->__(
26 "Please use only letters (a-z or A-Z), numbers (0-9) or symbols '-' and '_' in this field"
blockwishlist.tpl (https://gitlab.com/staging06/myproject) Smarty Template · 65 lines
7 * that is bundled with this package in the file LICENSE.txt.
8 * It is also available through the world-wide-web at this URL:
9 * http://opensource.org/licenses/afl-3.0.php
10 * If you did not receive a copy of the license and are unable to
11 * obtain it through the world-wide-web, please send an email
20 * @author PrestaShop SA <contact@prestashop.com>
21 * @copyright 2007-2015 PrestaShop SA
22 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
23 * International Registered Trademark & Property of PrestaShop SA
24 *}
26 <div id="wishlist_block" class="block account">
27 <h4 class="title_block">
28 <a href="{$link->getModuleLink('blockwishlist', 'mywishlist', array(), true)|addslashes}" title="{l s='My wishlists' mod='blockwishlist'}" rel="nofollow">{l s='Wishlist' mod='blockwishlist'}</a>
29 </h4>
30 <div class="block_content">
save_comments.php (https://github.com/HelipengTony/oblog.git) PHP · 152 lines
1 <?php
2 error_reporting(E_ALL ^ E_NOTICE);
3 /*
18 function save($key)
19 {
20 return !empty($_POST[$key]) ? addslashes($_POST[$key]) : 0;
21 }
22 function infofy($string)
86 //处理评论内容
87 if ($post->valid_comm_post($pid)) {
88 $json_string = file_get_contents(dirname(dirname(__FILE__)) . '/comments/' . $pid . ".json"); // 从文件中读取数据到PHP变量
89 $data = json_decode($json_string, true); // 把JSON字符串转成PHP数组
special.tpl (https://bitbucket.org/mjalajel/opencart.git) Smarty Template · 132 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
6 <?php } ?>
37 <tr id="module-row<?php echo $module_row; ?>">
38 <td class="left"><input type="text" name="special_module[<?php echo $module_row; ?>][limit]" value="<?php echo $module['limit']; ?>" placeholder="<?php echo $entry_limit; ?>" class="input-mini" /></td>
39 <td class="left"><input type="text" name="special_module[<?php echo $module_row; ?>][image_width]" value="<?php echo $module['image_width']; ?>" placeholder="<?php echo $entry_width; ?>" class="input-mini" />
40 <input type="text" name="special_module[<?php echo $module_row; ?>][image_height]" value="<?php echo $module['image_height']; ?>" placeholder="<?php echo $entry_height; ?>" class="input-mini" />
41 <?php if (isset($error_image[$module_row])) { ?>
82 <?php } ?>
83 </select></td>
84 <td class="right"><input type="text" name="special_module[<?php echo $module_row; ?>][sort_order]" value="<?php echo $module['sort_order']; ?>" placeholder="<?php echo $entry_sort_order; ?>" class="input-mini" /></td>
85 <td class="left"><a onclick="$('#module-row<?php echo $module_row; ?>').remove();" class="btn"><i class="icon-minus-sign"></i> <?php echo $button_remove; ?></a></td>
109 <?php foreach ($layouts as $layout) { ?>
110 html += ' <option value="<?php echo $layout['layout_id']; ?>"><?php echo addslashes($layout['name']); ?></option>';
111 <?php } ?>
permission.php (https://github.com/acavedon/pAdmin.git) PHP · 237 lines
47 $varContent .= " <td width=\"100%\">\n";
48 $varContent .= " <strong>\n";
49 $varContent .= " <a href=\"javascript:executar('view','$varCodPermission','permission-view.php')\">\n";
50 $varContent .= " $varStrNameUser\n";
51 $varContent .= " </a>\n";
53 $varContent .= " </td>\n";
54 $varContent .= " <td align=\"center\" class=\"nobr\">\n";
55 $varContent .= " <a href=\"javascript:executar('edit','$varCodPermission','permission-edit.php')\" class=\"edtButton\">\n";
56 $varContent .= " <img src=\"../images/admin/icons/edit.png\" width=\"16\" height=\"15\" border=\"0\" />\n";
57 $varContent .= " Edit\n";
66 $varContent .= " <td height=\"30\" colspan=\"4\" class=\"nobr\">\n";
67 $varContent .= " <img src=\"../images/admin/ico_selecionados.gif\" width=\"38\" height=\"22\" border=\"0\" />\n";
68 $varContent .= " <a href=\"javascript: executar('exclude','','permission-del.php','You sure about this?')\">\n";
69 $varContent .= " <img src=\"../images/admin/icons/user-trash.gif\" width=\"16\" height=\"16\" border=\"0\" />\n";
70 $varContent .= " Del selected\n";
Activity.class.php (https://github.com/harriswong/ATutor.git) PHP · 151 lines
1 <?php
2 /****************************************************************/
3 /* ATutor */
30 */
31 function addActivity($id, $title, $app_id=0){
32 global $db, $addslashes;
33 $id = intval($id);
34 $app_id = intval($app_id);
144 $row = mysql_fetch_assoc($result);
146 $msg = _AT("has_added_app", url_rewrite(AT_SOCIAL_BASENAME.'applications.php?app_id='.$app_id, AT_PRETTY_URL_IS_HEADER),
147 htmlentities_utf8($row['title']));
148 return $msg;
tbl_info.inc.php (https://github.com/md-tech/openemr.git) PHP · 111 lines
PHPArray.php (https://bitbucket.org/valmy/openx.git) PHP · 236 lines
1 <?php
2 // +----------------------------------------------------------------------+
3 // | PHP Version 4 |
4 // +----------------------------------------------------------------------+
5 // | Copyright (c) 1997-2003 The PHP Group |
6 // +----------------------------------------------------------------------+
7 // | This source file is subject to version 2.0 of the PHP license, |
8 // | that is bundled with this package in the file LICENSE, and is |
9 // | available at through the world-wide-web at |
10 // | http://www.php.net/license/2_02.txt. |
11 // | If you did not receive a copy of the PHP license and are unable to |
12 // | obtain it through the world-wide-web, please send a note to |
13 // | license@php.net so we can mail you a copy immediately. |
14 // +----------------------------------------------------------------------+
15 // | Authors: Bertrand Mansion <bmansion@mamasam.com> |
index.php (https://github.com/harriswong/ATutor.git) PHP · 101 lines
1 <?php
2 /****************************************************************/
3 /* ATutor */
13 // $Id$
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
16 authenticate(AT_PRIV_CONTENT);
25 if ($row['content_type'] == CONTENT_TYPE_CONTENT || $row['content_type'] == CONTENT_TYPE_WEBLINK) {
26 header('Location: '.AT_BASE_HREF.'mods/_core/editor/edit_content.php?cid='.$cid);
27 } else if ($row['content_type'] == CONTENT_TYPE_FOLDER) {
28 header('Location: '.AT_BASE_HREF.'mods/_core/editor/edit_content_folder.php?cid='.$cid);
30 exit;
31 } else if (isset($_GET['delete'], $_GET['ctid'])) {
32 header('Location: '.AT_BASE_HREF.'mods/_core/editor/delete_content.php?cid='.intval($_GET['ctid']));
33 exit;
34 } else if (isset($_GET['view'], $_GET['ctid'])) {
language.php (https://github.com/zakgrant/forkcms.git) PHP · 408 lines
1 <?php
3 /**
53 array((string) $language, (string) $application));
55 // start generating PHP
56 $value = '<?php' . "\n";
92 // parse
93 if($application == 'backend') $value .= '$' . $type . '[\'' . $item['module'] . '\'][\'' . $item['name'] . '\'] = \'' . str_replace('\"', '"', addslashes($item['value'])) . '\';' . "\n";
94 else $value .= '$' . $type . '[\'' . $item['name'] . '\'] = \'' . str_replace('\"', '"', addslashes($item['value'])) . '\';' . "\n";
100 }
102 // close php
103 $value .= "\n";
104 $value .= '?>';
user_password.php (https://gitlab.com/albert925/lading-ach) PHP · 142 lines
3 /**
4 * displays and handles the form where the user can change his password
5 * linked from main.php
6 *
7 * @uses $GLOBALS['strUpdateProfileMessage']
41 * Gets some core libraries
42 */
43 require_once './libraries/common.inc.php';
45 /**
91 $sql_query = 'SET password = ' . (($password == '') ? '\'\'' : $hashing_function . '(\'***\')');
92 $local_query = 'SET password = ' . (($password == '') ? '\'\'' : $hashing_function . '(\'' . PMA_sqlAddslashes($password) . '\')');
93 $result = @PMA_DBI_try_query($local_query)
94 or PMA_mysqlDie(PMA_DBI_getError(), $sql_query, false, $err_url);
112 PMA_showMessage($strUpdateProfileMessage, $sql_query, 'success');
113 ?>
114 <a href="index.php<?php echo PMA_generate_common_url($_url_params); ?>" target="_parent">
115 <strong><?php echo $strBack; ?></strong></a>
mots_partout_choses.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 293 lines
1 <?php
43 $id_mot = intval($id_mot);
44 if($id_mot > 0) {
45 switch(addslashes($action)) {
46 case 'avec':
47 $ajouter[] = $id_mot;
148 'titre_chose' => 'syndic',
149 'id_chose' => 'id_syndic',
150 //exception : objet (voir inc/mot.php)
151 'objet' => 'syndic',
152 'table_principale' => 'spip_syndic',
TableEntityQuery.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 350 lines
1 <?php
2 /**
3 * Zend Framework
279 {
280 if (!is_array($value)) {
281 $text = str_replace('?', '\'' . addslashes($value) . '\'', $text);
282 } else {
283 $i = 0;
286 $text = substr_replace($text, $value[$i++], strpos($text, '?'), 1);
287 } else {
288 $text = substr_replace($text, '\'' . addslashes($value[$i++]) . '\'', strpos($text, '?'), 1);
289 }
290 }
mysql.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 84 lines
1 <?php // $Id: mysql.php,v 1.17 2006/10/26 22:39:13 stronk7 Exp $
3 // THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
4 //
5 // IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
6 // LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
8 function resource_upgrade($oldversion) {
25 if ($resources = get_records_select("resource", "type='3' OR type='5'", "", "id, alltext")) {
26 foreach ($resources as $resource) {
27 $resource->popup = addslashes($resource->alltext);
28 $resource->alltext = "";
29 if (!update_record("resource", $resource)) {
76 }
78 ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
80 return true;
TableEntityQuery.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 355 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: TableEntityQuery.php 23167 2010-10-19 17:53:31Z mabe $
21 */
284 {
285 if (!is_array($value)) {
286 $text = str_replace('?', '\'' . addslashes($value) . '\'', $text);
287 } else {
288 $i = 0;
291 $text = substr_replace($text, $value[$i++], strpos($text, '?'), 1);
292 } else {
293 $text = substr_replace($text, '\'' . addslashes($value[$i++]) . '\'', strpos($text, '?'), 1);
294 }
295 }
view.php (https://github.com/ewandor/horde.git) PHP · 127 lines
1 <?php
2 /**
3 * Copyright 2001-2012 Horde LLC (http://www.horde.org/)
7 */
9 require_once dirname(__FILE__) . '/lib/Application.php';
10 Horde_Registry::appInit('nag');
17 $task = $storage->getByUID($uid);
18 } catch (Nag_Exception $e) {
19 Horde::url('list.php', true)->redirect();
20 }
21 $task_id = $task->id;
23 } else {
24 /* If we aren't provided with a task and tasklist, redirect to
25 * list.php. */
26 $task_id = Horde_Util::getFormData('task');
27 $tasklist_id = Horde_Util::getFormData('tasklist');
smartyadmin.config.inc.php (https://gitlab.com/staging06/myproject) PHP · 86 lines
1 <?php
2 /*
3 * 2007-2015 PrestaShop
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
21 * @author PrestaShop SA <contact@prestashop.com>
22 * @copyright 2007-2015 PrestaShop SA
23 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24 * International Registered Trademark & Property of PrestaShop SA
25 */
38 $htmlentities = !isset($params['js']);
39 $pdf = isset($params['pdf']);
40 $addslashes = (isset($params['slashes']) || isset($params['js']));
41 $sprintf = isset($params['sprintf']) ? $params['sprintf'] : null;
default.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 89 lines
16 ?>
17 <div id="installer-discover">
18 <form action="<?php echo JRoute::_('index.php?option=com_installer&view=discover');?>" method="post" name="adminForm" id="adminForm">
19 <?php if (!empty( $this->sidebar)) : ?>
51 <tbody>
52 <?php foreach ($this->items as $i => $item) : ?>
53 <tr class="row<?php echo $i % 2;?>">
54 <td><?php echo JHtml::_('grid.id', $i, $item->extension_id); ?></td>
55 <td><span class="bold hasTip" title="<?php echo htmlspecialchars($item->name.'::'.$item->description); ?>"><?php echo $item->name; ?></span></td>
56 <td class="center"><?php echo JText::_('COM_INSTALLER_TYPE_' . $item->type); ?></td>
60 <td class="center"><?php echo $item->client; ?></td>
61 <td class="center">
62 <span class="editlinktip hasTip" title="<?php echo addslashes(htmlspecialchars(JText::_('COM_INSTALLER_AUTHOR_INFORMATION').'::'.$item->author_info)); ?>">
63 <?php echo @$item->author != '' ? $item->author : ' '; ?>
tbl_replace_fields.inc.php (https://github.com/jackygrahamez/DrugDiscovery-Home.git) PHP · 134 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
18 * note: grab_globals has extracted the fields from _FILES or HTTP_POST_FILES
19 *
20 * @version $Id: tbl_replace_fields.inc.php 12245 2009-02-23 08:36:34Z lem9 $
21 *
22 * @uses $_REQUEST
28 * @uses implode()
29 * @uses PMA_NO_VARIABLES_IMPORT
30 * @uses PMA_sqlAddslashes()
31 * @package phpMyAdmin
32 */
33 if (! defined('PHPMYADMIN')) {
34 exit;
35 }
class_cache.php (https://gitlab.com/elasa/vb-elasa.ir) PHP · 254 lines
TableEntityQuery.php (https://github.com/kiranatama/sagalaya.git) PHP · 314 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
267 {
268 if (!is_array($value)) {
269 $text = str_replace('?', '\'' . addslashes($value) . '\'', $text);
270 } else {
271 $i = 0;
274 $text = substr_replace($text, $value[$i++], strpos($text, '?'), 1);
275 } else {
276 $text = substr_replace($text, '\'' . addslashes($value[$i++]) . '\'', strpos($text, '?'), 1);
277 }
278 }
user_password.php (https://github.com/jackygrahamez/DrugDiscovery-Home.git) PHP · 106 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
19 }
20 if ($cfg['Server']['auth_type'] == 'config' || !$cfg['ShowChgPassword']) {
21 require_once './libraries/header.inc.php';
22 echo '<p><b>' . $strError . '</b></p>' . "\n"
23 . '<p> ' . $strNoRights . '</p>' . "\n";
72 // Displays the page
73 require_once './libraries/header.inc.php';
74 echo '<h1>' . $strChangePassword . '</h1>' . "\n\n";
75 $show_query = 'y';
76 PMA_showMessage($strUpdateProfileMessage);
77 ?>
78 <a href="index.php?<?php echo $common_url_query . $http_logout; ?>" target="_parent">
79 <b><?php echo $strBack; ?></b></a>
language.php (https://github.com/Shigaru/shigaru.git) PHP · 219 lines
class._database_i.php (https://gitlab.com/mes-participacao-digital/noosfero) PHP · 152 lines
error.class.php (https://gitlab.com/x33n/ampache) PHP · 145 lines
1 <?php
2 /* vim:set softtabstop=4 shiftwidth=4 expandtab: */
3 /**
24 * Error class
25 *
26 * This is the baic error class, its better now that we can use php5
27 * hello static functions and variables
28 *
83 // If on SSE worker, output the error directly.
84 if (defined('SSE_OUTPUT')) {
85 echo "data: display_sse_error('" . addslashes($message) . "')\n\n";
86 ob_flush();
87 flush();
view.php (https://github.com/finger2000/horde.git) PHP · 127 lines
1 <?php
2 /**
3 * Copyright 2001-2011 Horde LLC (http://www.horde.org/)
7 */
9 require_once dirname(__FILE__) . '/lib/Application.php';
10 Horde_Registry::appInit('nag');
17 $task = $storage->getByUID($uid);
18 } catch (Nag_Exception $e) {
19 Horde::url('list.php', true)->redirect();
20 }
21 $task_id = $task->id;
23 } else {
24 /* If we aren't provided with a task and tasklist, redirect to
25 * list.php. */
26 $task_id = Horde_Util::getFormData('task');
27 $tasklist_id = Horde_Util::getFormData('tasklist');
smarty_internal_compile_private_print_expression.php (https://gitlab.com/Shenglian/SmartyProject) PHP · 162 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Compile Print Expression
56 if (isset($_attr[ 'assign' ])) {
57 // assign output to variable
58 return "<?php \$_smarty_tpl->assign({$_attr['assign']},{$output});?>";
59 } else {
60 // display value
81 // autoescape html
82 if ($compiler->template->smarty->escape_html) {
83 $output = "htmlspecialchars({$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
84 }
85 // loop over registered filters
124 $compiler->has_output = true;
125 $output = "<?php echo {$output};?>";
126 }
lock.js.php (https://github.com/teamplus/teamplus.git) PHP · 142 lines
1 <?php
3 /**
104 function atkLockCheck()
105 {
106 var sURI = '<?php echo session_url('include.php?file=atk/lock/lock.php&type=xml&stack='.$stack);?>&id=' + atkLock.theIdentifier + '&sequence=' + atkLock.theSequence;
108 if (atkLock.type == 'xml')
125 var image = new Image();
126 image.onerror = atkLockUnlock;
127 image.src = '<?php echo session_url('include.php?file=atk/lock/lock.php&type=image&stack='.$stack);?>&id=' + atkLock.theIdentifier + '&sequence=' + atkLock.theSequence;
128 }
129 }
138 document.images['_lock_'].src='<?php echo atkconfig("atkroot");?>atk/images/lock_expired.gif';
139 alert('<?php echo addslashes($message); ?>');
140 }
pedidos.class.php (https://gitlab.com/Thomazelli/triade) PHP · 355 lines
1 <?php
3 /*****
17 require_once("db.class.php");
292 ".(($this->plan_id)?($this->plan_id):"DEFAULT").",
293 ".(($this->ped_valor)?($this->ped_valor):"DEFAULT").",
294 ".(($this->ped_data_compra)?"'".addslashes($this->ped_data_compra)."'":"DEFAULT").",
295 ".(($this->status_id)?($this->status_id):"DEFAULT")."
296 )";
317 plan_id = ".(($this->plan_id)?($this->plan_id):"DEFAULT").",
318 ped_valor = ".(($this->ped_valor)?($this->ped_valor):"DEFAULT").",
319 ped_data_compra = ".(($this->ped_data_compra)?"'".addslashes($this->ped_data_compra)."'":"DEFAULT").",
320 status_id = ".(($this->status_id)?($this->status_id):"DEFAULT")."
321 WHERE
listing.php (https://bitbucket.org/frchico/chamilo_openshift.git) PHP · 80 lines
1 <?php
2 /* For licensing terms, see /license.txt */
31 foreach ($categories as $id => $title) {
32 if ($i==ADD_BLOCK) {
33 echo '<a href="index.php?'.api_get_cidreq().'&action=add">'.Display::return_icon($default_description_icon[$id], $title,'',ICON_SIZE_MEDIUM).'</a>';
34 break;
35 } else {
36 echo '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.Display::return_icon($default_description_icon[$id], $title,'',ICON_SIZE_MEDIUM).'</a>';
37 $i++;
38 }
43 // display course description list
44 if ($history) {
45 echo '<div><table width="100%"><tr><td><h3>'.get_lang('ThematicAdvanceHistory').'</h3></td><td align="right"><a href="index.php?action=listing">'.Display::return_icon('info.png',get_lang('BackToCourseDesriptionList'),array('style'=>'vertical-align:middle;'),ICON_SIZE_SMALL).' '.get_lang('BackToCourseDesriptionList').'</a></td></tr></table></div>';
46 }
47 $user_info = api_get_user_info();
bestseller.tpl (https://gitlab.com/AndreyLes/top-tap) Smarty Template · 130 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
6 <?php } ?>
13 <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
14 <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a></div>
15 </div>
16 <div class="content">
32 <tbody id="module-row<?php echo $module_row; ?>">
33 <tr>
34 <td class="left"><input type="text" name="bestseller_module[<?php echo $module_row; ?>][limit]" value="<?php echo $module['limit']; ?>" size="1" /></td>
35 <td class="left"><input type="text" name="bestseller_module[<?php echo $module_row; ?>][image_width]" value="<?php echo $module['image_width']; ?>" size="3" />
80 <td class="right"><input type="text" name="bestseller_module[<?php echo $module_row; ?>][sort_order]" value="<?php echo $module['sort_order']; ?>" size="3" /></td>
81 <td class="left"><a onclick="$('#module-row<?php echo $module_row; ?>').remove();" class="button"><?php echo $button_remove; ?></a></td>
82 </tr>
83 </tbody>
106 <?php foreach ($layouts as $layout) { ?>
107 html += ' <option value="<?php echo $layout['layout_id']; ?>"><?php echo addslashes($layout['name']); ?></option>';
108 <?php } ?>
transformations.lib.php (https://github.com/ade56/aboutme.git) PHP · 246 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Set of functions used with the relation and pdf feature
5 *
6 * @package phpMyAdmin
7 */
107 foreach ($filestack as $file) {
108 if (preg_match('|^.*__.*\.inc\.php$|', $file)) {
109 // File contains transformation functions.
110 $base = explode('__', str_replace('.inc.php', '', $file));
115 $stack['transformation_file'][] = $file;
117 } elseif (preg_match('|^.*\.inc\.php$|', $file)) {
118 // File is a plain mimetype, no functions.
119 $base = str_replace('.inc.php', '', $file);
functions.php (https://github.com/artisdom/freeradius-server.git) PHP · 146 lines
1 <?php
2 function da_sql_limit($limit,$point,$config)
3 {
16 if ($config[sql_use_http_credentials] == 'yes'){
17 global $HTTP_SERVER_VARS;
18 $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
19 $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
32 if ($config[sql_use_http_credentials] == 'yes'){
33 global $HTTP_SERVER_VARS;
34 $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
35 $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
48 if ($config[sql_use_http_credentials] == 'yes'){
49 global $HTTP_SERVER_VARS;
50 $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
51 $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"];
cls_session.php (https://github.com/country3721/choclate.git) PHP · 290 lines
f1.php (https://github.com/pai982010j90/gcv.git) PHP · 192 lines
12 <body>
13 <form name="frmimage" id="frmimage" method="post"
14 enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>">
15 Nombre: <input type="text" id="nombre" name="nombre" /><br />
16 Imagen: <input type="file" id="foto" name="foto" /><br />
20 </html>
22 <?php
23 // Verificamos que el formulario no ha sido enviado aun
147 $tfoto = fread($fp, filesize($tmp_name));
149 $tfoto = addslashes($tfoto);
151 fclose($fp);
albums.php (https://github.com/terasa/import_repo.git) PHP · 169 lines
32 $adds[] = "`" . $db->addslashes($key) . "` = null";
33 } else {
34 $adds[] = "`" . $db->addslashes($key) . "` = '" . $db->addslashes($val) . "'";
35 }
36 }
45 public function get_album($album_id) {
46 global $db;
47 $album_id = $db->addslashes($album_id);
48 $query = "
49 select
127 $updates[] = "`" . $db->addslashes($key) . "` = null";
128 } else {
129 $updates[] = "`" . $db->addslashes($key) . "` = '" . $db->addslashes($val) . "'";
130 }
131 }
Ini.php (https://github.com/studioskylab/Docblox.git) PHP · 212 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Ini.php 16201 2009-06-21 18:51:15Z thomas $
20 */
23 * @see Zend_Config_Writer
24 */
25 require_once 'Zend/Config/Writer.php';
27 /**
119 if ($this->_filename === null) {
120 require_once 'Zend/Config/Exception.php';
121 throw new Zend_Config_Exception('No filename was set');
122 }
ImportLdi.php (https://gitlab.com/trungthao379/phpmyadmin) PHP · 175 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * CSV import plugin for phpMyAdmin using LOAD DATA
5 *
6 * @package PhpMyAdmin-Import
14 use PMA\libraries\properties\options\items\TextPropertyItem;
16 if (!defined('PHPMYADMIN')) {
17 exit;
18 }
28 * Handles the import for the CSV format using load data
29 *
30 * @package PhpMyAdmin-Import
31 * @subpackage LDI
32 */
config.php (https://github.com/wildanm/Jibas.git) PHP · 109 lines
27 // ------------------------------------------------------------
29 if (file_exists('../include/global.patch.manager.php'))
30 {
31 require_once('../include/global.patch.manager.php');
32 ApplyGlobalPatch("..");
33 }
34 elseif (file_exists('../../include/global.patch.manager.php'))
35 {
36 require_once('../../include/global.patch.manager.php');
37 ApplyGlobalPatch("../..");
38 }
39 elseif (file_exists('../../../include/global.patch.manager.php'))
40 {
41 require_once('../../../include/global.patch.manager.php');
administradores.php (https://gitlab.com/henriquebotega/protesto) PHP · 140 lines
6 include_once $_SERVER['DOCUMENT_ROOT'] . "/uploads/protesto/php/ip.php";
7 } else if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/php/protesto/php/ip.php")) {
8 include_once $_SERVER['DOCUMENT_ROOT'] . "/php/protesto/php/ip.php";
11 }
13 include_once URL_PHP_CRUD . "cAdmin.php";
14 $dados = new cAdmin();
68 if(empty($dataPHP->registroAtual->senha_atual)){
69 $where = " (a.id_tipo = '" . addslashes($dataPHP->registroAtual->id_tipo) . "' AND a.id = '" . addslashes($dataPHP->registroAtual->id) . "' AND a.senha = '') ";
70 $retorno = $dados->select($where, "", "");
71 } else {
72 $where = " (a.id_tipo = '" . addslashes($dataPHP->registroAtual->id_tipo) . "' AND a.id = '" . addslashes($dataPHP->registroAtual->id) . "' AND a.senha = '" . md5(addslashes($dataPHP->registroAtual->senha_atual)) . "') ";
73 $retorno = $dados->select($where, "", "");
74 }
btt.php (https://github.com/weissms/owb-mirror.git) PHP · 115 lines
1 <?php
3 class BunnyTags_Import {
19 echo '<p><strong>'.__('All existing Bunny’s Technorati Tags will be removed after import.').'</strong></p>';
20 echo '<p><strong>'.__('Don’t be stupid - backup your database before proceeding!').'</strong></p>';
21 echo '<form action="admin.php?import=btt&step=1" method="post">';
22 wp_nonce_field('import-btt');
23 echo '<p class="submit"><input type="submit" name="submit" value="'.__('Import Tags »').'" /></p>';
75 $post_keys = explode(' ', $post_meta->meta_value);
76 foreach ( $post_keys as $keyword ) {
77 $keyword = addslashes(trim(str_replace('+',' ',$keyword)));
78 if ( '' != $keyword ) {
79 echo '<li>' . $post_meta->post_id . ' - ' . $keyword . '</li>';
89 }
91 echo '<form action="admin.php?import=btt&step='.($precheck? 2:3).'" method="post">';
92 wp_nonce_field('import-btt');
93 echo '<p class="submit"><input type="submit" name="submit" value="'.__('Next »').'" /></p>';
class.pog_base.php (https://github.com/gcsolaroli/password-manager.git) PHP · 143 lines
1 <?php
2 class POG_Base
3 {
7 function __call($method, $argv)
8 {
9 include_once($GLOBALS['configuration']['plugins_path']."/IPlugin.php");
10 include_once($GLOBALS['configuration']['plugins_path']."/plugin.".strtolower($method).".php");
55 return base64_encode($text);
56 }
57 return addslashes($text);
58 }
smartyadmin.config.inc.php (https://gitlab.com/A.Julien/sendstockbymail-module-prestashop) PHP · 86 lines
1 <?php
2 /*
3 * 2007-2016 PrestaShop
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
21 * @author PrestaShop SA <contact@prestashop.com>
22 * @copyright 2007-2016 PrestaShop SA
23 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24 * International Registered Trademark & Property of PrestaShop SA
25 */
38 $htmlentities = !isset($params['js']);
39 $pdf = isset($params['pdf']);
40 $addslashes = (isset($params['slashes']) || isset($params['js']));
41 $sprintf = isset($params['sprintf']) ? $params['sprintf'] : null;
post_salles.php
(http://gespac.googlecode.com/svn/trunk/)
PHP · 215 lines
✨ Summary
This PHP code manages a database of computer equipment, specifically PCs and other devices, stored in a table called “materiels”. It allows users to perform various actions such as adding, modifying, and deleting records, as well as exporting data from the database to a file. The code also handles user authentication and authorization, with specific permissions for certain users.
This PHP code manages a database of computer equipment, specifically PCs and other devices, stored in a table called “materiels”. It allows users to perform various actions such as adding, modifying, and deleting records, as well as exporting data from the database to a file. The code also handles user authentication and authorization, with specific permissions for certain users.
1 <?PHP
8 // lib
9 require_once ('../fonctions.php');
10 include_once ('../config/databases.php');
11 include_once ('../../class/Log.class.php');
12 include_once ('../../class/Sql.class.php');
70 if ( $action == 'add' ) {
72 $nom = addslashes($_POST['nom']);
73 $vlan = addslashes($_POST['vlan']);
74 $etage = addslashes($_POST['etage']);
75 $batiment = addslashes($_POST['batiment']);
listGridCMS_USERS.php (https://github.com/juddy/GIP.git) PHP · 309 lines
1 <?php
2 include_once("../common/dbConnection.php");
3 include_once("../common/header.php");
4 ?>
5 <?
9 {
10 // Retreiving Form Elements from Form
11 $thisUSER_ID = addslashes($_REQUEST['thisUSER_IDField']);
12 $thisUSER_NAME = addslashes($_REQUEST['thisUSER_NAMEField']);
13 $thisUSER_PASSWORD = addslashes($_REQUEST['thisUSER_PASSWORDField']);
14 $thisUSER_FIRSTNAME = addslashes($_REQUEST['thisUSER_FIRSTNAMEField']);
15 $thisUSER_LASTNAME = addslashes($_REQUEST['thisUSER_LASTNAMEField']);
16 $thisUSER_EMAIL = addslashes($_REQUEST['thisUSER_EMAILField']);
database.php (https://github.com/nicocode/BlaBlub.git) PHP · 293 lines
1 <?
2 /**
3 * Database.php
4 *
5 * The Database class is meant to simplify the task of accessing
9 * Last Updated: August 17, 2004
10 */
11 include("constants.php");
13 class MySQLDB
52 /* Add slashes if necessary (for query) */
53 if(!get_magic_quotes_gpc()) {
54 $username = addslashes($username);
55 }
HTMLTagDecorator.php (https://github.com/orchestra-io/sample-openx.git) PHP · 102 lines
1 <?php
3 /*
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 +---------------------------------------------------------------------------+
25 $Id: HTMLTagDecorator.php 30820 2009-01-13 19:02:17Z andrew.hill $
26 */
27 require_once MAX_PATH.'/lib/OA/Admin/UI/component/decorator/AbstractDecorator.php';
70 $prepend = "<".$this->_tagName;
71 foreach ($this->_aAttributes as $name => $value) {
72 $value = addslashes($value);
73 $prepend .=' '.$name.'="'.$value.'"';
74 }
blockwishlist.tpl (https://gitlab.com/brunorafael/enosis) Smarty Template · 65 lines
7 * that is bundled with this package in the file LICENSE.txt.
8 * It is also available through the world-wide-web at this URL:
9 * http://opensource.org/licenses/afl-3.0.php
10 * If you did not receive a copy of the license and are unable to
11 * obtain it through the world-wide-web, please send an email
20 * @author PrestaShop SA <contact@prestashop.com>
21 * @copyright 2007-2016 PrestaShop SA
22 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
23 * International Registered Trademark & Property of PrestaShop SA
24 *}
26 <div id="wishlist_block" class="block account">
27 <h4 class="title_block">
28 <a href="{$link->getModuleLink('blockwishlist', 'mywishlist', array(), true)|addslashes}" title="{l s='My wishlists' mod='blockwishlist'}" rel="nofollow">{l s='Wishlist' mod='blockwishlist'}</a>
29 </h4>
30 <div class="block_content">
postfields.plugin.php (https://github.com/somefool/habari-extras.git) PHP · 187 lines
class._database.php (https://gitlab.com/noosfero-mes/noosfero-mes) PHP · 146 lines
check_user_privileges.lib.php (https://github.com/amcl/openemr.git) PHP · 178 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Get user's global privileges and some db-specific privileges
5 * ($controllink and $userlink are links to MySQL defined in the "common.inc.php" library)
6 * Note: if no controluser is defined, $controllink contains $userlink
7 *
8 * @version $Id$
9 */
10 if (! defined('PHPMYADMIN')) {
11 exit;
12 }
111 $mysql_cur_user = substr($mysql_cur_user_and_host, 0, strrpos($mysql_cur_user_and_host, '@'));
113 $local_query = 'SELECT Create_priv, Reload_priv FROM mysql.user WHERE ' . PMA_convert_using('User') . ' = ' . PMA_convert_using(PMA_sqlAddslashes($mysql_cur_user), 'quoted') . ' OR ' . PMA_convert_using('User') . ' = ' . PMA_convert_using('', 'quoted') . ';';
114 $rs_usr = PMA_DBI_try_query($local_query, $controllink, PMA_DBI_QUERY_STORE); // Debug: or PMA_mysqlDie('', $local_query, false);
115 if ($rs_usr) {
search-id.php (https://github.com/michaelmwu/saratogahigh.com.git) PHP · 91 lines
1 <?
2 // Michael Wu || saratogahigh.com
3 // directory/search-id.php: search for students by id
4 // Most probably an XML request thing
47 // Search by first or last name or both
48 if($l == "")
49 $query = "SELECT USER_ID, USER_FN, USER_LN, USER_GR FROM USER_LIST WHERE USER_FN_SOUNDEX=SOUNDEX('" . addslashes($f) . "') ORDER BY (USER_FN='" . addslashes($f) . "') DESC, USER_GR DESC, USER_LN, USER_FN";
50 else if($f == "")
51 $query = "SELECT USER_ID, USER_FN, USER_LN, USER_GR FROM USER_LIST WHERE USER_LN_SOUNDEX=SOUNDEX('" . addslashes($l) . "') ORDER BY (USER_LN='" . addslashes($l) . "') DESC, USER_GR DESC, USER_LN, USER_FN";
52 else
53 $query = "SELECT USER_ID, USER_FN, USER_LN, USER_GR FROM USER_LIST WHERE USER_LN_SOUNDEX=SOUNDEX('" . addslashes($l) . "') AND USER_FN_SOUNDEX=SOUNDEX('" . addslashes($f) . "') ORDER BY (USER_LN='" . addslashes($l) . "') DESC, (USER_FN='" . addslashes($f) . "') DESC, USER_GR DESC, USER_LN, USER_FN";
55 $result = mysql_query($query) or die("Query failed");
Layout.php (https://github.com/ewandor/horde.git) PHP · 125 lines
auth.class.php (https://github.com/masuman/elgg-1.git) PHP · 116 lines
1 <?php
2 /**
3 * auth.class.php
20 * Boston, MA 02110-1301 USA
21 */
22 require_once dirname(__FILE__)."/../pfci18n.class.php";
23 require_once dirname(__FILE__)."/../pfcuserconfig.class.php";
24 require_once dirname(__FILE__)."/../pfcproxycommand.class.php";
26 /**
66 if (!$isadmin)
67 {
68 $xml_reponse->script("alert('".addslashes(_pfc("You are not allowed to run '%s' command", $this->name))."');");
69 return false;
70 }
relation_cleanup.lib.php (https://github.com/jackygrahamez/DrugDiscovery-Home.git) PHP · 177 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Set of functions used for cleaning up phpMyAdmin tables
5 *
6 * @version $Id: relation_cleanup.lib.php 11986 2008-11-24 11:05:40Z nijel $
7 * @package phpMyAdmin
8 */
9 if (! defined('PHPMYADMIN')) {
14 *
15 */
16 require_once './libraries/relation.lib.php';
18 /**
index.php (https://github.com/samlev/MICO.git) PHP · 81 lines
29 // Connects to the database, and brings in the standard library
30 include_once(FS_ROOT.'/inc/connect.php');
32 ?>
47 <script type="text/javascript">
48 <!--
49 var FS_ROOT = '<?php echo (defined('FS_ROOT')?addslashes(FS_ROOT):'') ?>';
50 var WEB_DOMAIN = '<?php echo (defined('WEB_DOMAIN')?addslashes(WEB_DOMAIN):'') ?>';
51 var WEB_ROOT = '<?php echo (defined('WEB_ROOT')?addslashes(WEB_ROOT):'') ?>';
52 var APP_ROOT = '<?php echo (defined('APP_ROOT')?addslashes(APP_ROOT):'') ?>';
69 var OLD_VERSION = '<?php echo addslashes(Settings::get_default('MICO_VERSION','unknown'))?>';
70 var NEW_VERSION = '<?php echo addslashes(MICO_VERSION)?>';
72 setTimeout("Mico.Upgrader.show();",200);
add_news.php (https://github.com/cindyli/ATutor.git) PHP · 102 lines
1 <?php
2 /****************************************************************/
3 /* ATutor */
13 // $Id$
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require (AT_INCLUDE_PATH.'vitals.inc.php');
16 require(AT_INCLUDE_PATH.'lib/tinymce.inc.php');
52 $_POST['formatting'] = intval($_POST['formatting']);
53 $_POST['title'] = $addslashes($_POST['title']);
55 //The following checks if title length exceed 100, defined by DB structure
69 $return_url = $_SESSION['tool_origin']['url'];
70 tool_origin('off');
71 //header('Location: '.AT_BASE_HREF.'mods/_standard/announcements/index.php');
72 header('Location: '.$return_url );
73 exit;
OpenWiki.class.php (https://github.com/andreassolberg/dokuwikiadmin.git) PHP · 302 lines
108 owner = '" . addslashes($this->getOwner()) . "',
109 access = " . addslashes($this->getAccess()) . " WHERE id = '" . addslashes($this->getIdentifier()) . "'";
111 $res = mysql_query($sql, $this->db);
119 $res = mysql_query("INSERT INTO openwiki (id, name, descr, owner, access) values ('" .
120 addslashes($this->getIdentifier()) . "','" . addslashes($this->getName()) .
121 "', '" . addslashes($this->getDescr()) . "', '" .
122 addslashes($this->getOwner()) . "', " . addslashes($this->getAccess()) . ")", $this->db);
123 if(mysql_error()){
124 throw new Exception('Invalid query: ' . mysql_error());
157 addslashes($this->getIdentifier()) . "','" . addslashes($entry[0]) . "', " .
158 addslashes($entry[1]) . ", " . addslashes($priority) . ")", $this->db);
159 if(mysql_error()){
160 throw new Exception('Invalid query: ' . mysql_error());
forms_fonctions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 129 lines
1 <?php
3 /*
43 $query = "SELECT COUNT(DISTINCT c.id_reponse) AS num ".
44 "FROM spip_reponses AS r LEFT JOIN spip_reponses_champs AS c USING (id_reponse) ".
45 "WHERE r.id_form=$id_form AND r.statut='valide' AND c.champ='".addslashes($t['code'])."'";
46 $result = spip_query($query);
47 list ($total_reponses) = spip_fetch_array($result,SPIP_NUM);
67 "FROM spip_reponses AS r LEFT JOIN spip_reponses_champs AS c USING (id_reponse) ".
68 "WHERE r.id_form=$id_form AND r.statut='valide' ".
69 "AND c.champ='".addslashes($t['code'])."' GROUP BY c.valeur";
70 $result = spip_query($query);
71 $chiffres = array();
Frontuser.php (https://bitbucket.org/lanoversolutions/afterschool.git) PHP · 281 lines
CacheDb.class.php (https://github.com/qhwang0427/backend_php.git) PHP · 205 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
97 public function get($name)
98 {
99 $name = addslashes($name);
100 $this->Q(1);
101 $result = $this->db->getRow('select `data`,`datacrc`,`datasize` from `'.$this->options['table'].'` where `cachekey`=\''.$name.'\' and (`expire` =-1 OR `expire`>'.time().') limit 0,1');
138 {
139 $data = serialize($value);
140 $name = addslashes($name);
141 $this->W(1);
142 if( C('DATA_CACHE_COMPRESS') && function_exists('gzcompress')) {
MysqlPlatform.php (https://github.com/makerlabs/Symfohub.git) PHP · 120 lines
1 <?php
2 /*
3 * $Id: MysqlPlatform.php 1262 2009-10-26 20:54:39Z francois $
17 * This software consists of voluntary contributions made by many individuals
18 * and is licensed under the LGPL. For more information please see
19 * <http://propel.phpdb.org>.
20 */
22 require_once 'propel/engine/platform/DefaultPlatform.php';
24 /**
98 return mysql_escape_string($text);
99 } else {
100 return addslashes($text);
101 }
102 }
magic_namepost.php (https://github.com/sichen/hrmmdiscuz.git) PHP · 133 lines
1 <?php
3 /**
5 * This is NOT a freeware, use is subject to license terms
6 *
7 * $Id: magic_namepost.php 18832 2010-12-07 04:01:53Z liulanbo $
8 */
77 showmessage(lang('magic/namepost', 'namepost_info_user_noperm'));
78 }
79 $author = daddslashes($member['username']);
81 usemagic($this->magic['magicid'], $this->magic['num']);
class_forumupload.php (https://github.com/sichen/hrmmdiscuz.git) PHP · 125 lines
1 <?php
3 /**
5 * This is NOT a freeware, use is subject to license terms
6 *
7 * $Id: class_forumupload.php 19297 2010-12-27 05:55:47Z monkey $
8 */
61 }
63 if($type = DB::fetch_first("SELECT maxsize FROM ".DB::table('forum_attachtype')." WHERE extension='".addslashes($upload->attach['ext'])."'")) {
64 if($type['maxsize'] == 0) {
65 $this->error_sizelimit = 'ban';
Ini.php (https://bitbucket.org/mercysam/zfs.git) PHP · 212 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Ini.php 14176 2009-02-26 22:21:26Z dasprid $
20 */
23 * @see Zend_Config_Writer
24 */
25 require_once 'Zend/Config/Writer.php';
27 /**
119 if ($this->_filename === null) {
120 require_once 'Zend/Config/Exception.php';
121 throw new Zend_Config_Exception('No filename was set');
122 }
ArrayHelper.php (https://gitlab.com/madebycloud/derekman) PHP · 215 lines
auto_cache.php (https://github.com/AndyRixon/LayerBulletin.git) PHP · 195 lines
1 <?php
2 /*
3 +--------------------------------------------------------------------------
9 | ========================================
10 |+--------------------------------------------------------------------------
11 | autocache.php - re-caches forum index & stats
13 */
24 $query2 = "select ID from {$db_prefix}posts WHERE TITLE=''" ;
25 $result2 = mysql_query($query2) or die("online.php - Error in query: $query2") ;
26 $posts=mysql_num_rows($result2);
28 $query2 = "select DISTINCT TOPIC_ID from {$db_prefix}posts" ;
29 $result2 = mysql_query($query2) or die("online.php - Error in query: $query2") ;
30 $topics=mysql_num_rows($result2);
class-ai1wm-import-database.php (https://gitlab.com/vanafroo/voipWEB) PHP · 466 lines
1 <?php
2 /**
3 * Copyright (C) 2014-2016 ServMask Inc.
92 // Get escaped Upload Path
93 if ( ! in_array( addslashes( addcslashes( ai1wm_blogsdir_path( $blog->Old->Id ), '\/' ) ), $old_values ) ) {
94 $old_values[] = addslashes( addcslashes( ai1wm_blogsdir_path( $blog->Old->Id ), '\/' ) );
95 $new_values[] = addslashes( addcslashes( ai1wm_blogsdir_path( $blog->New->Id ), '\/' ) );
96 }
104 // Get escaped Upload Path
105 if ( ! in_array( addslashes( addcslashes( ai1wm_uploads_path( $blog->Old->Id ), '\/' ) ), $old_values ) ) {
106 $old_values[] = addslashes( addcslashes( ai1wm_uploads_path( $blog->Old->Id ), '\/' ) );
rating_model.php (https://bitbucket.org/bivekmindz/foxsky.git) PHP · 133 lines
1 <?php
2 class Rating_Model extends CI_Model {
3 public function __construct() {
78 $data = $query->result();
79 $pro_id = $data['0']->ProId;
80 $sql = "INSERT INTO tblreview (prod_id,user_id,headline,review_des,status) VALUES ('".$pro_id."','".$user_id."','".$headline."','".addslashes($review_des)."','I')";
81 $str = $this->db->query($sql);
82 $query = $this->db->query('SELECT LAST_INSERT_ID() FROM tblreview');
add_feed.php (https://github.com/cindyli/ATutor.git) PHP · 110 lines
20 if (isset($_POST['cancel'])) {
21 $msg->addFeedback('CANCELLED');
22 header("Location: index.php");
23 exit;
24 } else if (isset($_POST['submit'])) {
52 $hidden_vars['output'] = $output;
54 require (AT_INCLUDE_PATH.'header.inc.php');
55 $msg->addConfirm('ADD_FEED', $hidden_vars);
56 $msg->printConfirm();
76 $feed_id = at_insert_id();
77 //copy load file
78 copy('load_file.php', AT_CONTENT_DIR.'feeds/'.$feed_id.'_rss.inc.php');
80 //add language
Ini.php (https://github.com/orchestra-io/sample-openx.git) PHP · 212 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Ini.php 14175 2009-02-26 22:14:58Z dasprid $
20 */
23 * @see Zend_Config_Writer
24 */
25 require_once 'Zend/Config/Writer.php';
27 /**
119 if ($this->_filename === null) {
120 require_once 'Zend/Config/Exception.php';
121 throw new Zend_Config_Exception('No filename was set');
122 }
fonction_parse.php (https://github.com/relaismago/outils.git) PHP · 82 lines
8 return "La comptence ". $data["nom"]. " ". $data["date"]. " pour la cible " .$data["idCible"]. " a dja t enregistr !";
9 else
10 mysql_db_query($bdd,"INSERT INTO `ggc_event` (`id_event`, `id_lanceur` , `id_cible` , `type` , `nom` , `texte` , `date` ) VALUES (NULL, '" .intval($data["idLanceur"]). "', '" .intval($data["idCible"]). "', '" .addslashes($data["type"]). "', '" .addslashes($data["nom"]). "', '$texte', '" .addslashes($data["date"]). "' );",$db_link) or die(mysql_error());
12 return "Comptence ajout pour votre GGC !";
21 return "Le Sortilge ". $data["nom"]. " ". $data["date"]. " pour la cible " .$data["idCible"]. " a dja t enregistr !";
22 else
23 mysql_db_query($bdd,"INSERT INTO `ggc_event` (`id_event`, `id_lanceur` , `id_cible` , `type` , `nom` , `texte` , `date` ) VALUES (NULL, '" .intval($data["idLanceur"]). "', '" .intval($data["idCible"]). "', '" .addslashes($data["type"]). "', '" .addslashes($data["nom"]). "', '$texte', '" .addslashes($data["date"]). "' );",$db_link) or die(mysql_error());
25 return "Sortilge ajout pour votre GGC !";
34 $desc = preg_replace( "#.+\((.*)\)#", "$1", $text );
36 mysql_db_query($bdd,"INSERT INTO `ggc_tresor` (`id_tresor`, `nom` , `desc`) VALUES (" .intval($id). ", '" .addslashes($nom). "', '" .addslashes($desc). "');",$db_link) or die(mysql_error());
38 }
index.php (https://github.com/olberger/fusionforge.git) PHP · 215 lines
1 <?php
2 /*
3 * Project labels plugin
6 */
8 require_once '../../../www/env.inc.php';
9 require_once $gfcommon.'include/pre.php';
10 require_once $gfwww.'admin/admin_utils.php';
12 site_admin_header(array('title'=>_('Project labels')));
16 if ($func == 'addlabel') {
17 $label_name = addslashes (getStringFromRequest ('label_name')) ;
18 $label_text = addslashes (getStringFromRequest ('label_text')) ;
attachrenew.php (https://github.com/maddogfyg/itangyou.git) PHP · 151 lines
1 <?php
2 !function_exists('adminmsg') && exit('Forbidden');
33 $thread['url']=$attach['attachurl'];
34 $thread['name']=$attach['name'];
35 $thread['where']="thread.php?fid=$fid";
36 $threaddb[]=$thread;
37 }
138 }
139 if($update){
140 $attachs=$attachs ? addslashes(serialize($attachs)):'';
141 $db->update("UPDATE $pw_posts SET aid=".pwEscape($attachs)."WHERE tid=".pwEscape($aids['tid']));
142 }
default.php (https://github.com/gpongelli/joomla-cms.git) PHP · 89 lines
16 ?>
17 <div id="installer-discover">
18 <form action="<?php echo JRoute::_('index.php?option=com_installer&view=discover');?>" method="post" name="adminForm" id="adminForm">
19 <?php if(!empty( $this->sidebar)): ?>
51 <tbody>
52 <?php foreach ($this->items as $i => $item): ?>
53 <tr class="row<?php echo $i % 2;?>">
54 <td><?php echo JHtml::_('grid.id', $i, $item->extension_id); ?></td>
55 <td><span class="bold hasTip" title="<?php echo htmlspecialchars($item->name.'::'.$item->description); ?>"><?php echo $item->name; ?></span></td>
56 <td class="center"><?php echo JText::_('COM_INSTALLER_TYPE_' . $item->type); ?></td>
60 <td class="center"><?php echo $item->client; ?></td>
61 <td class="center">
62 <span class="editlinktip hasTip" title="<?php echo addslashes(htmlspecialchars(JText::_('COM_INSTALLER_AUTHOR_INFORMATION').'::'.$item->author_info)); ?>">
63 <?php echo @$item->author != '' ? $item->author : ' '; ?>
template_smarty.php (https://github.com/ckwalsh/phpBB-Smarty.git) PHP · 208 lines
7 **/
9 require($phpbb_root_path . 'vendor/Smarty/libs/Smarty.class.php');
11 /**
35 if (isset($user->lang[$tag_arg]))
36 {
37 return '?>' . addslashes($user->lang[$tag_arg]) . '<?php';
38 }
39 else
40 {
41 return 'echo(isset($this->_tpl_vars[\'LA_' . $tag_arg . '\']) ? addslashes($this->_tpl_vars[\'LA_' . $tag_arg . '\']) : \'{LA ' . $tag_arg . '}\');';
42 }
43 }
sharing.php (https://github.com/luthercollege/reason_package.git) PHP · 111 lines
1 <?php
2 /**
3 * @package reason
8 * Include the default module
9 */
10 reason_include_once('classes/admin/modules/associator.php');
12 /**
28 {
29 $this->head_items->add_stylesheet(REASON_ADMIN_CSS_DIRECTORY.'sharing.css');
30 reason_include_once( 'classes/sharing_filter.php' );
31 reason_include_once( 'content_listers/sharing.php' );
78 $nes->add_type( id_of('type') );
79 $nes->add_right_relationship( $this->admin_page->site_id, relationship_id_of( 'site_cannot_edit_type' ) );
80 $nes->add_relation('`entity`.`id` = "'.addslashes($this->admin_page->type_id).'"');
81 $nes->set_num(1);
82 $nes->limit_tables();
socolissimo_redirect.tpl (https://gitlab.com/ptisky/API_prestashop) Smarty Template · 85 lines
7 * that is bundled with this package in the file LICENSE.txt.
8 * It is also available through the world-wide-web at this URL:
9 * http://opensource.org/licenses/afl-3.0.php
10 * If you did not receive a copy of the license and are unable to
11 * obtain it through the world-wide-web, please send an email
20 * @author PrestaShop SA <contact@prestashop.com> Quadra Informatique <modules@quadra-informatique.fr>
21 * @copyright 2007-2016 PrestaShop SA
22 * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
23 * International Registered Trademark & Property of PrestaShop SA
24 *}
36 {foreach from=$inputs item=input key=name name=myLoop}
37 soInputs.{$name} = "{$input|strip_tags|addslashes}";
38 {/foreach}
special.tpl (https://bitbucket.org/vsepessarii/vsepessarii.git) Smarty Template · 130 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
6 <?php } ?>
13 <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
14 <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a></div>
15 </div>
16 <div class="content">
32 <tbody id="module-row<?php echo $module_row; ?>">
33 <tr>
34 <td class="left"><input type="text" name="special_module[<?php echo $module_row; ?>][limit]" value="<?php echo $module['limit']; ?>" size="1" /></td>
35 <td class="left"><input type="text" name="special_module[<?php echo $module_row; ?>][image_width]" value="<?php echo $module['image_width']; ?>" size="3" />
80 <td class="right"><input type="text" name="special_module[<?php echo $module_row; ?>][sort_order]" value="<?php echo $module['sort_order']; ?>" size="3" /></td>
81 <td class="left"><a onclick="$('#module-row<?php echo $module_row; ?>').remove();" class="button"><?php echo $button_remove; ?></a></td>
82 </tr>
83 </tbody>
106 <?php foreach ($layouts as $layout) { ?>
107 html += ' <option value="<?php echo $layout['layout_id']; ?>"><?php echo addslashes($layout['name']); ?></option>';
108 <?php } ?>
slideshow.tpl (https://bitbucket.org/deringer/opencart.git) Smarty Template · 142 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
6 <?php } ?>
13 <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
14 <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a></div>
15 </div>
16 <div class="content">
36 <?php if ($banner['banner_id'] == $module['banner_id']) { ?>
37 <option value="<?php echo $banner['banner_id']; ?>" selected="selected"><?php echo $banner['name']; ?></option>
38 <?php } else { ?>
112 <?php foreach ($banners as $banner) { ?>
113 html += ' <option value="<?php echo $banner['banner_id']; ?>"><?php echo addslashes($banner['name']); ?></option>';
114 <?php } ?>
118 <?php foreach ($layouts as $layout) { ?>
119 html += ' <option value="<?php echo $layout['layout_id']; ?>"><?php echo addslashes($layout['name']); ?></option>';
120 <?php } ?>
upgrade.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 221 lines
1 <?php //$Id: upgrade.php,v 1.1.2.2 2009/02/23 19:22:42 dlnsk Exp $
3 // This file keeps track of upgrades to
16 //
17 // The commands in here will all be database-neutral,
18 // using the functions defined in lib/ddllib.php
20 function xmldb_attforblock_upgrade($oldversion=0) {
29 /// upgrade code.
31 if ($result && $oldversion < 2008021904) { //New version in version.php
32 global $USER;
33 if ($sessions = get_records('attendance_sessions', 'takenby', 0)) {
36 $sess->takenby = $USER->id;
37 $sess->timetaken = $sess->timemodified ? $sess->timemodified : time();
38 $sess->description = addslashes($sess->description);
39 $result = update_record('attendance_sessions', $sess) and $result;
40 }