function func_execute_active_handler() { if (isset($_GET['q'])) { $q = format_str($_GET['q']); $query = (array) explode('/', $q); $GLOBALS['page'] = $query[0]; } else { $query = ""; $GLOBALS['page'] = ""; } $page = $GLOBALS['func_registry'][$GLOBALS['page']]; if (!$page) { header('HTTP/1.0 404 Not Found'); die('404 - Page not found.'); } if (isset($page['security']) && $page['security']) { user_ensure_authenticated(); } if (isset($page['admin']) && $page['admin']) { user_ensure_admin(); } if (function_exists('config_log_request')) { config_log_request(); } if (function_exists($page['callback'])) { return call_user_func($page['callback'], $query); } return false; }
function tweet_post() { $args = func_get_args(); $cate = $args[2]; $content = format_str($_POST['text'], false); if (!$cate or !$content) { die("Invalid argument!"); } include_once 'sinaoauth.inc.php'; $c = new WeiboClient(SINA_AKEY, SINA_SKEY, $GLOBALS['user']['sinakey']['oauth_token'], $GLOBALS['user']['sinakey']['oauth_token_secret']); if ($_FILES['upload']['tmp_name']) { $msg = $c->upload($content, $_FILES['upload']['tmp_name']); } else { $msg = $c->update($content); } if ($msg === false || $msg === null) { echo "Error occured"; return false; } if (isset($msg['error_code']) && isset($msg['error'])) { echo 'Error_code: ' . $msg['error_code'] . '; Error: ' . $msg['error']; return false; } include_once "uuid.inc.php"; $v4uuid = str_replace("-", "", UUID::v4()); connect_db(); $add = "INSERT INTO pending_tweets (\r\n site_id, tweet_id, user_site_id, content, post_datetime,\r\n type, tweet_site_id,\r\n post_screenname, profile_image_url, source)\r\n VALUES (1, '{$v4uuid}', '" . $msg['user']['id'] . "', '{$content}', '" . date("Y-m-d H:i:s", strtotime($msg["created_at"])) . "',\r\n {$cate}, '" . $msg['id'] . "', '" . $msg["user"]["name"] . "', '" . $msg["user"]["profile_image_url"] . "', '" . $msg["source"] . "')"; if ($msg['thumbnail_pic']) { $add = "INSERT INTO pending_tweets (\r\n site_id, tweet_id, user_site_id, content, post_datetime,\r\n type, tweet_site_id,\r\n post_screenname, profile_image_url, source, thumbnail)\r\n VALUES (1, '{$v4uuid}', '" . $msg['user']['id'] . "', '{$content}', '" . date("Y-m-d H:i:s", strtotime($msg["created_at"])) . "',\r\n {$cate}, '" . $msg['id'] . "', '" . $msg["user"]["name"] . "', '" . $msg["user"]["profile_image_url"] . "', '" . $msg["source"] . "', '" . $msg['thumbnail_pic'] . "')"; } $added = mysql_query($add) or die("Could not add entry!"); echo "0"; }
function get_home_voices() { $home_voices = array(); $sql_1 = "SELECT uv.*, u.profile_pic\n FROM user_voices uv\n LEFT JOIN users u ON u.id=uv.user_id\n\n WHERE uv.is_blocked='0'\n ORDER BY RAND()\n LIMIT 20\n "; $home_voices = @format_str(@mysql_exec($sql_1)); return $home_voices; }
/** * function to get all Patronage Points details for a User * [Params] * $user_id = user * $user_ppoints_id = to get a specific point data (leave empty to pull all data instead) * $fetch_total_only = set as `true` to get total count only, instead of full data set from user_petronage_points table */ function get_ppoints($user_id, $user_ppoints_id = '', $fetch_total_only = false) { if ($user_id <= 0) { return false; } if ($fetch_total_only != false) { $sql_1 = "SELECT total_patronage_points FROM user_info WHERE user_id='{$user_id}'"; $upp_res = @mysql_exec($sql_1, 'single'); if (!is_array($upp_res) || count($upp_res) < 0) { return false; } return (int) @$upp_res['total_patronage_points']; } else { $sql_1 = "SELECT * FROM user_petronage_points WHERE user_id='{$user_id}' "; if ($user_ppoints_id > 0) { $sql_1 .= " AND id='{$user_ppoints_id}'"; } $sql_1 .= " ORDER BY received_on DESC"; $upp_res = @format_str(@mysql_exec($sql_1)); //var_dump("<pre>", $upp_res); if (!is_array($upp_res) || count($upp_res) < 0) { return false; } return $upp_res; } }
function get_member_info($member_id, $user_id) { if ($member_id <= 0) { return false; } #/ All Fields $fetch_fields = array('package_id', 'email_add', 'screen_name', 'profile_pic', 'first_name', 'middle_name', 'last_name', 'company_name', 'identify_by', 'joined_on', 'country_code', 'state', 'city', 'address_ln_1', 'address_ln_2', 'zip', 'phone_number'); #/ Get user_permission $user_permissions = array(); $sql_1 = "SELECT fields_perm FROM user_permissions WHERE user_id='{$member_id}'"; $up_ar = @format_str(@mysql_exec($sql_1, 'single')); if (is_array($up_ar) && array_key_exists('fields_perm', $up_ar)) { $user_permissions = @explode(',', @$up_ar['fields_perm']); } #/ Filter fields based on permissions if ($member_id != $user_id) { if (!empty($user_permissions)) { $fetch_fields = array_diff($fetch_fields, $user_permissions); } } $fetch_fields_str = implode(',', $fetch_fields); //var_dump("<pre>", $user_permissions, $fetch_fields, $fetch_fields_str); die(); if (empty($fetch_fields_str)) { return false; } #/ Get Member's Info $fetch_fields_str = str_replace('country_code', 'ui.country_code', $fetch_fields_str); $sql_2 = "SELECT u.id as user_id,\n {$fetch_fields_str},\n (CASE\n WHEN identify_by='screen_name' THEN screen_name\n WHEN identify_by='full_name' THEN CONCAT(first_name, ' ', middle_name, ' ', last_name)\n WHEN identify_by='company_name' THEN company_name\n ELSE 'Member'\n END) AS user_ident,\n c.country_name,\n st.state_name\n\n FROM users u\n LEFT JOIN user_info ui ON ui.user_id=u.id\n LEFT JOIN countries c USING(country_code)\n LEFT JOIN states st ON st.state_code=ui.state\n\n WHERE u.id='{$member_id}'\n AND u.is_blocked='0'\n "; $members_ar = @format_str(@mysql_exec($sql_2, 'single')); //var_dump("<pre>", $members_ar); die(); return array($members_ar, $user_permissions); }
function format_string(&$string) { if (is_array($string)) { return format_arr($string); } else { format_str($string); } }
/** * Function format_str * Formats string and arrays (Please upgrade as per your need) * version 6.3 * Author: Raheel Hasan * $in = input string/array * $max_length (def: 0) = set it to an int value and it will cut-out all chars after this length. Set to "{INTVAL}:dot" and it will also insert dots after int value * $add_space (def: false) = set it to a value and it will Add Space after this length * $escape_mysql (def:false) = set to TRUE if escaping/sanitizing for mysql query. This will apply mysql_real_escape * $utf (default: false) = set as TRUE in-order to FORCE and convert result into UTF-8 (from ISO-8859-1). * OR set to 'utf-ignore' to ignore between UTF-8 to UTF8 only (or iso-ignore) - use this when the source is in utf but require fixes * $rem_inline (default: true) = set as TRUE in-order to remove all inline xss. * $all (default: true) = set it to FALSE and it will NOT format Tags and ignore < and > from formating * * NOTE: * If the meta charset is not on UTF, you will have to convert strings manually everywhere (between db save and retrive). * For this, either Save (in db) as normal and Retrive as utf, -or- Save as utf and Retrive as normal. * But DONOT do utf conversion on both sides. */ function format_str($in, $max_length = 0, $add_space = false, $escape_mysql = false, $utf = false, $rem_inline = true, $all = true) { $out = $in; if (is_array($out)) { $out_x = array(); foreach ($out as $k => $v) { $k = strip_tags($k); $k = remove_x($k); $k = format_str($k); $v = format_str($v, $max_length, $add_space, $escape_mysql, $utf, $rem_inline, $all); $out_x[$k] = $v; } $out = $out_x; } else { if ($rem_inline) { $out = preg_replace('/<(.*?)(on[a-z]{1,}[\\s]{0,}=[\\s]{0,})(.*?)>/ims', '<$1 x$2 $3>', $out); } if ($utf != false && stristr($utf, 'ignore') == false) { $out = @iconv("ISO-8859-1", "UTF-8//TRANSLIT//IGNORE", $out); //if(is_string($utf)){ //$out = @iconv("{$utf}", "UTF-8//IGNORE", $out); //} } if ($add_space != false) { $out = preg_replace("/([^\\s]{{$add_space}})/ims", '$1 ', $out); } $max_length_i = @explode(':', $max_length); $max_length_ic = @$max_length_i[0]; if ($max_length_ic > 0) { $cur_len = strlen($out); $out = substr($out, 0, $max_length_ic); $out .= $cur_len > $max_length_ic && isset($max_length_i[1]) && $max_length_i[1] == 'dot' ? ' ...' : ''; } if ($all) { $out = str_replace('<', '<', $out); $out = str_replace('>', '>', $out); } $out = str_replace("'", ''', $out); $out = str_replace('"', '"', $out); $out = str_replace("(", '(', $out); $out = str_replace(")", ')', $out); $out = str_replace("\\", '\', $out); //most important //$out = trim($out); if ($utf == 'utf-ignore') { $out = @iconv("UTF-8", "UTF-8//IGNORE", $out); } else { if ($utf == 'iso-ignore') { $out = @iconv("ISO-8859-1", "UTF-8//IGNORE", $out); } } if ($escape_mysql != false) { $out = mysql_real_escape_string($out); } $out = trim($out); } return $out; }
function cust_order_status() { $sql_1 = "SELECT\n\n DISTINCT order_status,\n COUNT(*) AS t_os\n\n FROM cust_orders\n\n GROUP BY order_status\n ORDER BY t_os DESC\n LIMIT 10\n "; $ret = ''; $result = @mysql_exec($sql_1); if (count($result) > 0) { $ret = @format_str($result); #/ Set Gradient $ret = color_pie_chart($ret); } return $ret; }
function get_package_info($pk_id, $get_benefits = false) { if (empty($pk_id)) { return false; } $sql_part = ''; if ($get_benefits != false) { $sql_part = ""; } $sql_1 = "SELECT title, cost, is_basic, is_recursive, recursive_cost\n FROM membership_packages mp\n WHERE is_active='1'\n AND id='{$pk_id}'\n "; $package_info = @format_str(@mysql_exec($sql_1)); return $package_info; }
/** * find all PARENT ids of Recursive Relationship - with just 1 sql query call * * @param $f1 = node id * @param $table_name = name of the table * @param $dir = direction of breadcrumbs * @param $parent_field_name = field name of parent id */ function get_uppers($f1, $table_name, $dir = 'left', $parent_field_name = 'parent_id', $ori = '1') { $frm = array(); static $res_ary = array(); $res = false; $breadcr = '««'; if ($dir == 'right') { $breadcr = '»»'; } ## get dataset if ($ori != '0') { $sql = "select id, {$parent_field_name}, title from {$table_name}"; //echo $sql; $res = mysql_exec($sql); if ($res !== false) { foreach ($res as $k => $v) { $res_ary["{$table_name}"][$v['id']] = array(); $res_ary["{$table_name}"][$v['id']][] = $v; } } } $res = @$res_ary["{$table_name}"][$f1]; //var_dump($res_ary); //die(); ##-- ## process dataset recursively if ($res != false) { foreach ($res as $k => $v) { $frm[] = format_str($v['title']); $t1 = get_uppers($v[$parent_field_name], $table_name, $dir, $parent_field_name, '0'); if (!empty($t1)) { $frm = array_merge($frm, $t1); } } //end foreach.... if ($ori != '0') { //var_dump($frm); $frm = array_reverse($frm); $frm[count($frm) - 1] = '<u>' . $frm[count($frm) - 1] . '</u>'; $frm = implode(" {$breadcr} ", $frm); } } ##-- return $frm; }
<br /> <?php echo "No Results / Records Found !"; if ($search_it) { echo " Please clear the Filter and try again !"; } ?> <br /><br /> </td> </tr> <?php } else { $c = 0; ## Customer Orders table start from here while ($recrd) { $recrd = format_str($recrd); $c++; $skip_flag = false; $title = $recrd["title"]; if ($sr_title !== false && $sr_title != '') { $title = $src->get_highlighted($title, 'title'); if ($title == '--continue--continue--continue--continue--') { $skip_flag = true; } //fail safe } $seo_tag = $recrd["seo_tag"]; if ($sr_seo_tag !== false && $sr_seo_tag != '') { $seo_tag = $src->get_highlighted($seo_tag, 'seo_tag'); if ($seo_tag == '--continue--continue--continue--continue--') { $skip_flag = true;
<div style="width:130px; float:left;">Percentage Points:</div> <div style="float:left;"><input type="text" id="percentage_points" name="percentage_points" maxlength="2" value="<?php echo format_str(@$empt['percentage_points']); ?> " style="width:40px; border:1px solid #000261;" /> % <span class="submsg"> (numeric only)</span> <span class="submsg"> Percentage based Patronage Points for this Action.</span> <span class="submsg"> Applied only if Direct Points is set to '0' in the above field.</span> </div> <div style="clear:both; height:20px;"></div> <div style="width:130px; float:left;">Limits Per Day:</div> <div style="float:left;"><input type="text" id="limits_per_day" name="limits_per_day" maxlength="3" value="<?php echo format_str(@$empt['limits_per_day']); ?> " style="width:40px; border:1px solid #000261;" /> <span style="color:#CC0000;"> *</span> <span class="submsg"> (numbers only)</span> <span class="submsg"> Usage Limits per Day per Member</span> </div> <div style="clear:both; height:20px;"></div> <div style="width:130px; float:left;">Is Active?</div> <div style="float:left;"><input type="checkbox" name="is_active" id="is_active" value="1" <?php if (@$empt['is_active'] != '0') { echo "checked='checked'"; }
<span class="submsg"> Firefox: first do Italic, then Bold. Chrome: Bold, then Italic</span><br /><br /> </div> <!--<input type="hidden" name="m_value" id="m_value" value="" />--> <input type="text" name="m_value" id="m_value" style="font-size:1px; border:none; background:none;" /> </div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;"> </div><div><hr /></div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;">Setting / Value2:</div> <div style="float:left;"><input type="text" id="content_settings" name="content_settings" maxlength="150" value="<?php echo format_str(@$empt['content_settings']); ?> " style="width:250px; border:1px solid #000261;" /> <span class="submsg"> for technical values only (will not be displayed) / please dont alter this</span><br /><br /> </div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;">Category:</div> <div style="float:left;"> <?php $sql_cats = "SELECT DISTINCT m_cat FROM site_misc_data ORDER BY m_cat"; $m_cats = mysql_exec($sql_cats); ?> <span class="submsg">for reference and grouping only / will not be displayed</span><br /><br /> <div id="m_cat_select">
$("#profile_pic").change(function(){ if($('#pImage_profile_pic').validationEngine('validate')) {return false;} preview_img(this, 'profile_thumb'); //preview image }); }); </script> <div class="website_fun"> <div class="container middle_content"> <div class="content_holder"> <div class="mid_bdy body-main" style="padding-top:30px;"> <h1><strong><?php echo format_str($pg_meta['page_title']); ?> </strong></h1> <br /> <div> <?php if ($success != false) { ?> <div>Thank you for completing your <b>Profile</b> at collaborateUSA.com, please <a href="<?php echo $consts['DOC_ROOT']; ?> signin"><b>Signin</b></a> to your Account.<br /><br />
//var_dump("<pre>", $site_misc_data); die(); #/ Packages $home_packages = false; if ($user_idc <= 0) { $home_packages = get_home_packages(); //var_dump("<pre>", $home_packages); die(); } #/ Home Voices $home_voices = get_home_voices(); //var_dump("<pre>", $home_voices); die(); #/ Other info $other_pg_inf = get_page_info('12'); //var_dump("<pre>", $other_pg_inf); die(); ///////////////////////////////////////////////////////////////////// #/ Fill pg_meta $pg_meta = array('meta_keywords' => format_str($page_info['meta_keywords']), 'meta_descr' => format_str($page_info['meta_descr'])); $current_pgx = 'home'; $load_bx_slider = true; $load_owl_carousel = true; include_once "includes/header.php"; ///////////////////////////////////////////////////////////////////// ?> <script src="<?php echo DOC_ROOT; ?> assets/js/func_home.js"></script> <?php ##------------------------------- Section 1 -------------------------------## ?>
?> <span class="submsg"> (total in all Stream, Rivers, Oceans, and EcoSphares)</span></div> <div style="clear:both; height:10px;"></div> <div style="width:160px; float:left;">Eco-System Ownerships:</div> <div style="float:left;"><?php echo (int) format_str(@$empt['eco_ownership_count']); ?> <span class="submsg"> (i.e. moderator count)</span></div> <div style="clear:both; height:10px;"></div> <div style="width:160px; float:left;">Eco-System Participations:</div> <div style="float:left;"><?php echo (int) format_str(@$empt['discussion_comments_count'] + @$empt['eco_discussions_count']); ?> <span class="submsg"> (i.e. Discussions & Comments)</span></div> <div style="clear:both;"></div> </td> </tr> <?php } ?> <?php if ($read_only <= 0) { ?> <tr><td> </td></tr>
$fv_errors[] = array("Your Account has <b>NOT been ACTIVATED</b> yet!<br />- Please follow the <b>Account Activation email</b> sent to you at the time of Signup in order to activate your Account first."); $fv_errors[] = array("If you have lost that email, please <a href=\"{$consts['DOC_ROOT']}account-confirm/resend\" style='font-weight:bold; color:red'>Click Here</a> to <b>RESEND</b> the Activation Email."); $show_form = false; $_SESSION['resend_chk'] = true; //allow Resend Form to be visible } #/ Check if account is blocked if ($chk_usr['is_blocked'] == 1) { $fv_errors[] = array("Your Account has <b>BLOCKED</b> by the Admin! Consequently, you will NOT be able to Access your Account."); $show_form = false; } } } #- if (!is_array($fv_errors) || empty($fv_errors) || count($fv_errors) <= 0) { $user_info = format_str($chk_usr); if (is_array($user_info) && array_key_exists('email_add', $user_info)) { //die('x'); #/ Setup Sessions $_SESSION['CUSA_Main_usr_id'] = (int) $user_info['user_id']; $_SESSION['CUSA_Main_usr_info'] = $user_info; $_SESSION['CUSA_Main_usr_info']['pass_w'] = ''; //hide from session $_SESSION['LAST_CUSA_Main_ACTIVITY'] = time(); reset_attempt_counts(); if ($user_info['screen_name'] == '') { $_SESSION["CUSA_MSG_GLOBAL"] = array(true, 'You have not setup your <b>Screen Name</b> yet. Please complete your <b>Profile Info</b> from the Profile edit page.'); //redirect_me('update-user-info'); redirect_me('ecosystem/'); } else { #/ take to Last Visited Page - or home page
<div style="clear:both;"></div> </td> </tr> <tr><td> </td></tr> <tr> <th>LOGIN INFO</th> </tr> <tr> <td valign="middle" style="padding:6px 4px;"> <div style="width:130px; float:left;">Email/LoginId:</div> <div style="float:left;"><input type="text" id="email_add" name="email_add" autocomplete="off" maxlength="100" value="<?php echo format_str(@$empt['email_add']); ?> " style="width:250px; border:1px solid #000261;" /><span style="color:#53A9E9;"> *</span> </div> <div style="clear:both; height:10px;"></div> <?php if ($au_id > 0) { //edit page ?> <div style="width:130px; float:left;">Update Password?</div> <div style="float:left;"><input type="checkbox" name="update_acc_info" id="update_acc_info" value="1" onclick="toggle_div(this, 'acc_info_div');" /> </div>
" /> <?php } ?> <table border="0" cellpadding="0" cellspacing="0" class="datagrid" width="100%"> <tr> <th>CATEGORY INFO</th> </tr> <tr> <td valign="middle" style="padding:6px 4px;"><br /> <div style="width:130px; float:left;">Title:</div> <div style="float:left;"><input type="text" id="title" name="title" maxlength="60" value="<?php echo format_str(@$empt['title']); ?> " style="width:250px; border:1px solid #000261;" /><span style="color:#CC0000;"> *</span> </div> <div style="clear:both; height:10px;"></div> <div style="width:130px; float:left;">Is Active?</div> <div style="float:left;"><input type="checkbox" name="is_active" id="is_active" value="1" <?php if (@$empt['is_active'] != '0') { echo "checked='checked'"; } ?> /> </div>
$user_permissions = @$member_info_ar[1]; //var_dump("<pre>", $user_permissions); die(); #/ Permission Images $public = "{$consts['DOC_ROOT']}assets/images/secure_public.png"; $private = "{$consts['DOC_ROOT']}assets/images/secure_private.png"; #/ Current Profile Pic $prof_pic = DOC_ROOT . "assets/images/ep.png"; if (array_key_exists('profile_pic', $member_info)) { if (!@empty($member_info['profile_pic'])) { $prof_pic = DOC_ROOT . "user_files/prof/{$member_id}/{$member_info['profile_pic']}"; } } $prof_pic_th = @substr_replace($prof_pic, '_th.', @strrpos($prof_pic, '.'), 1); #/ Country & State $countries = @format_str(@mysql_exec("SELECT * FROM countries ORDER BY country_name")); $states = @format_str(@mysql_exec("SELECT * FROM states WHERE country_code='US' ORDER BY state_name")); #/ Data to be placed $empt = $member_info; $empt_p = $user_permissions; if (isset($_POST['email_add'])) { $empt = $_POST; $empt_p = $_POST['user_perm']; } //var_dump("<pre>", $empt_p); die(); ///////////////////////////////////////////////////////////////////// #/ Fill pg_meta $pg_meta = array('page_title' => "Profile Update"); $page_heading = $pg_meta['page_title']; $load_validation = true; include_once "includes/header.php"; include_once '../includes/upload_btn_front.php';
/** ## * $srch_text = text to search * $table_field [array or string] = list of tables to search from * $hightight_key = set a key for highlight functionality. This key will be used when we call the highlight function * $type = SQL query type search. for example; 'equals', 'greater-than-equals', 'less-than-equals', 'like' etc ## **/ function where_it($srch_text, $table_field, $hightight_key = '', $type = 'contains') { $do = $do_par = $where = ''; $srx = array(); $srch = format_str($srch_text); $srch = stripslashes($srch); $srch_it = addslashes(mysql_real_escape_string($srch)); ### Generating Tokens within quotes $qx = substr_count($srch_it, """); if ($qx > 1) { $off1 = $off2 = $len = 0; $rem = $qx; $srz = $sry = array(); for ($i = 1; $i <= $qx; $i += 2) { $pos1 = strpos($srch_it, """, $off2); //1st quote start $off1 = $pos1 + 6; //1st quote end $pos2 = strpos($srch_it, """, $off1); //2nd quote start $off2 = $pos2 + 6; //2nd quote end if ($i == 1) { $srz[] = substr($srch_it, 0, $pos1); } $sry[] = substr($srch_it, $off1, $pos2 - $off1); $pos3 = strpos($srch_it, """, $off2); //3rd quote start $rem -= 2; if ($rem < 2) { $srz[] = str_replace(""", " ", substr($srch_it, $off2)); break; } else { $srz[] = substr($srch_it, $off2, $pos3 - $off2); } } //end for... $srz = explode(" ", implode(" ", $srz)); $srx = array_values(array_unique(array_diff(array_diff(array_merge($sry, $srz), array("")), array(" ")))); } else { $srx = array_values(array_unique(array_diff(array_diff(explode(" ", str_replace(""", " ", $srch_it)), array("")), array(" ")))); } ##--- //// if (!empty($hightight_key)) { $sr_tempxt = $this->srx; if (!is_array($sr_tempxt)) { $sr_tempxt = array(); } $sr_tempxt[] = array('key' => $hightight_key, 'val' => $srx); $this->srx = $sr_tempxt; } else { $this->srx = $srx; } //// if (is_array($table_field) == false) { $table_fiel = array($table_field); } else { $table_fiel = $table_field; } ### Building Query $ie = 0; foreach ($table_fiel as $v_table_field) { $do = ''; if (count($srx) > 1) { $i = 1; foreach ($srx as $v) { if ($type == 'equals') { $do .= "{$v_table_field}='{$v}'"; } else { if ($type == 'greater-than-equals') { $do .= "{$v_table_field}>='{$v}'"; } else { if ($type == 'less-than-equals') { $do .= "{$v_table_field}<='{$v}'"; } else { $do .= "{$v_table_field} like '%{$v}%'"; } } } if ($i < count($srx)) { $do .= " OR "; } $i++; } } else { $t0 = @$srx[0]; if ($type == 'equals') { $do .= "{$v_table_field} = '{$t0}'"; } else { if ($type == 'greater-than-equals') { $do .= "{$v_table_field} >= '{$t0}'"; } else { if ($type == 'less-than-equals') { $do .= "{$v_table_field} <= '{$t0}'"; } else { $do .= "{$v_table_field} like '%{$t0}%'"; } } } } $ie++; $do_par .= " ({$do}) "; if ($ie < count($table_fiel)) { $do_par .= "OR"; } } //end foreach... ##-- $where = " AND ({$do_par}) "; return $where; }
<?php require_once '../includes/config.php'; @header(' ', true, 404); ///////////////////////////////////////////////////////////////////// include_once '../includes/format_str.php'; include_once '../includes/func_1.php'; include_once '../includes/db_lib.php'; include_once '../includes/model_main.php'; //////////////////////////////////////////////////////////////////////// #/ Fill pg_meta $pg_meta = array('page_title' => format_str('404 - Not Found')); $page_heading = "404 - Content Not Found"; include_once "includes/header.php"; ?> <style> .l1 { margin-left:20px; text-align: left; } @media (max-width: 655px) { .l1 { text-align: center !important; margin:20px 0 0; } } </style> <div class="website_fun">
} ?> /> <span class="submsg">Content will be shown only in a PopUp, instead of a separate Independent Page</span> </div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;"> </div><div><hr /></div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;">HTML Content:</div> <div style="float:left;"> <?php $edit_obj = new make_editor($browser); echo $edit_obj->show_editor('pg_content', '480', '650', format_str(@$empt['pg_content'])); ?> <span style="color:#CC0000;"> *</span> </div> </div> <div style="clear:both;"></div> </td> </tr> </table> </div> <table border="0" cellpadding="0" cellspacing="0" class="datagrid" width="100%"> <tr><td> </td></tr>
<div style="clear:both; height:30px;"></div> <div style="width:160px; float:left; font-weight:bold;">Full Gateway Msg:</div> <?php if ($up_id > 0) { ?> <div style="float:left;"><?php echo @$empt['gateway_msg']; ?> </div><?php } else { if ($user_select > 0) { ?> <div style="float:left;"><textarea id="gateway_msg" name="gateway_msg" rows="5" style="width:255px; border:1px solid #000261;"><?php echo format_str(@$empt['gateway_msg']); ?> </textarea> </div><?php } } ?> <div style="clear:both;"></div> </td> </tr> <?php if ($read_only <= 0) { ?>
exit; } else { $fv_msg = 'Please clear the following Error(s):<br /><br />- '; $fv_msg_ar = array(); foreach ($fv_errors as $fv_k => $fv_v) { $fv_msg_ar = array_merge($fv_msg_ar, $fv_v); } $fv_msg .= @implode('<br />- ', $fv_msg_ar); $_SESSION["CUSA_MSG_GLOBAL"] = array(false, $fv_msg); update_attempt_counts(); } } //end if form post.. ///////////////////////////////////////////////////////////////////// if ($success == false) { $secret_questions = @format_str(@mysql_exec("SELECT * FROM secret_questions ORDER BY question")); } $category_msg = "Please use the form below to <b>Update</b> your Account Password at collaborateUSA.com."; #/ Fill pg_meta $pg_meta = array('page_title' => "Password Update"); $page_heading = $pg_meta['page_title']; $head_msg = "Update Account Password at collaborateUSA.com"; $load_validation = true; include_once "includes/header.php"; ///////////////////////////////////////////////////////////////////// ?> <link type="text/css" rel="stylesheet" href="<?php echo DOC_ROOT; ?> assets/css/form.css" />
<th>ACTIVITY COUNT</th> </tr> <tr> <td valign="middle" style="padding:6px 4px;"><br /> <div style="width:150px; float:left;">Total Voices:</div> <div style="float:left;"><?php echo (int) format_str(@$empt['voice_count']); ?> </div> <div style="clear:both; height:10px;"></div> <div style="width:150px; float:left;">Total Patronage Points:</div> <div style="float:left;"><?php echo number_format((int) format_str(@$empt['total_patronage_points']), 0); ?> </div> <div style="clear:both;"></div> </td> </tr> <?php } ?> <?php if ($read_only <= 0) { ?> <tr><td> </td></tr>
} ?> </div> <div id="m_cat_field_div" style="display:none;"><br /><input type="text" id="m_cat_field" name="m_cat" maxlength="25" value="" style="width:150px; border:1px solid #000261;" /><span style="color:#CC0000;"> *</span></div> </div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;"> </div><div><hr /></div> <div style="clear:both; height:15px;"></div> <div style="width:130px; float:left;">ALT Text:</div> <div style="float:left;"><input type="text" id="alt_text" name="alt_text" maxlength="100" value="<?php echo format_str(@$empt['alt_text']); ?> " style="width:250px; border:1px solid #000261;" /> </div> <div style="clear:both; height:10px;"></div> <div style="width:130px; float:left;">Media Type:</div> <div style="float:left;"> <select id="m_type" name="m_type" disabled=""> <option value="-">-Please Select-</option> <option value="image">Image</option> <option value="video">Video</option> </select> <span class="submsg"> auto generated</span>
if (!defined('BASEPATH')) { exit('No direct script access allowed'); } /////////////////////////////////////////////////////////////////// ##/ Integrate Generic HEader #/ get Page Info $page_info = @mysql_exec("SELECT * FROM site_pages WHERE seo_tag_id='11'", 'single'); #/ Fill pg_meta if (isset($title) && !empty($title)) { $page_title = $title; } else { $page_title = format_str(@$page_info['title']); } $pg_meta = array('page_title' => $page_title, 'meta_keywords' => format_str(@$page_info['meta_keywords']), 'meta_descr' => format_str(@$page_info['meta_descr'])); $page_heading = format_str(@$page_info['page_heading']); require_once CONTEXT_DOCUMENT_ROOT . '/includes/header.php'; /////////////////////////////////////////////////////////////////// $config = c_get_config(); ?> <link rel="stylesheet" type="text/css" media="all" href="<?php echo c_get_assets_url(); ?> css/style.css" /> <?php /*<link rel="stylesheet" type="text/css" media="all" href="<?php echo c_get_assets_url(); ?>css/header_footer.css" />*/ ?> <?php /*<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>*/
</div> <div style="clear:both; height:20px;"></div> <div style="width:130px; float:left;">Key:</div> <div style="float:left;"><input type="text" id="c_key" name="c_key" maxlength="50" disabled="" value="<?php echo format_str(@$empt['c_key']); ?> " style="width:250px; border:1px solid #000261;" /> </div> <div style="clear:both; height:10px;"></div> <div style="width:130px; float:left;">Value:</div> <div style="float:left;"><input type="text" id="c_value" name="c_value" maxlength="50" value="<?php echo format_str(@$empt['c_value']); ?> " style="width:100px; border:1px solid #000261;" /> <span style="color:#CC0000;"> *</span> </div> <div style="clear:both;"></div> </td> </tr> <tr><td> </td></tr> <tr> <td> <input type="submit" class="button" name="sub" value="Submit" style="width:120px;">
<?php require_once '../../includes/config.php'; include_once 'includes/session.php'; ///////////////////////////////////////////////////////////////////// include_once '../../includes/format_str.php'; include_once '../../includes/func_1.php'; include_once '../../includes/db_lib.php'; include_once "../../includes/admin/functions.php"; $_POST = format_str($_POST); $_GET = format_str($_GET); #/ Setup variables & check empty $my_user_id = (int) @$_SESSION["cusa_admin_usr_id"]; if ($my_user_id <= 0) { exit; } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// $pg_title = "ERROR 403 :: PERMISSION DENIED"; include_once "includes/header.php"; ?> <h1 style='color:#B7151A;'><?php echo $pg_title; ?> </h1> <div style='color:#B7151A; padding:0 20px;'> <br /><br /><br /> <b style='font-size:15px; font-weight:bold;'>ERROR 403</b><br /><br /> You do not have the Permissions to access this section!