function duplicate_po_ed($personnel) { $sql = "select count(*) as dup from po_ed where personcd='{$personnel}'"; $rs = execSelect($sql); $row = getRows($rs); $dup = $row['dup']; return $dup; }
function lisr_user_id() { $sql = "select count(*) as c_user from user where user_id='{$userid}'"; $rs = execSelect($sql); $row = getRows($rs); $c_user = $row['c_user']; return $c_user; }
function chk_trainingvenue($venue_cd) { $sql = "Select count(*) as total From second_training WHERE second_training.training_venue='{$venue_cd}'"; $rs = execSelect($sql); $row = getRows($rs); $total = $row['total']; unset($sql, $rs, $row); return $total; }
function jmd_admin_js() { global $event; if ($rs = getRows('select name, js from ' . safe_pfx('txp_js'))) { foreach ($rs as $row) { if ($row['name'] === 'default' || $row['name'] === $event) { $out[] = base64_decode($row['js']); } } echo tag(join("\n", $out), 'script', ' type="text/javascript"'); } }
function check_tables($tables, $type = 'FAST', $warnings = 0) { $msgs = array(); foreach ($tables as $table) { $rs = getRows("CHECK TABLE {$table} {$type}"); if ($rs) { foreach ($rs as $r) { if ($r['Msg_type'] != 'status' and ($warnings or $r['Msg_type'] != 'warning')) { $msgs[] = $table . cs . $r['Msg_type'] . cs . $r['Msg_text']; } } } } return $msgs; }
function fatch_Random_personnel_for_replacement($forpc, $assembly, $posting_status, $gender) { $sqlc = "select count(*) as cnt\r\n\tFrom personnela Inner Join office On personnela.officecd = office.officecd \r\n \tInner Join policestation On office.policestn_cd = policestation.policestationcd\r\n \tInner Join subdivision On office.subdivisioncd = subdivision.subdivisioncd\r\n \tInner Join poststat On personnela.poststat = poststat.post_stat\r\n \tInner Join assembly As ass_pre On personnela.assembly_temp = ass_pre.assemblycd\r\n \tInner Join assembly ass_per On personnela.assembly_perm = ass_per.assemblycd \r\n \tInner Join assembly ass_ofc On personnela.assembly_off = ass_ofc.assemblycd\r\n \tInner Join district On district.districtcd = subdivision.districtcd \r\n\tLeft Join termination On personnela.personcd = termination.personal_id"; $sqlc .= " WHERE termination.personal_id is null and personnela.gender='{$gender}' and personnela.assembly_temp<>'{$assembly}' and personnela.assembly_perm<>'{$assembly}' and personnela.assembly_off<>'{$assembly}' and personnela.poststat='{$posting_status}' "; $sqlc .= " and (personnela.booked='' or personnela.booked is null) and personnela.forpc='{$forpc}'"; $rsc = execSelect($sqlc); $rowc = getRows($rsc); $limit = $rowc['cnt']; //echo $limit; exit; $random_no = rand(0, $limit - 1); $sql = "Select personnela.personcd,personnela.officecd,personnela.officer_name,personnela.off_desg,office.address1,\r\n \toffice.address2,office.postoffice,policestation.policestation,subdivision.subdivision,district.district,\r\n office.pin,DATE_FORMAT(personnela.dateofbirth,'%d-%m-%Y') as dateofbirth,personnela.gender,personnela.epic,\r\n \tpoststat.poststatus,personnela.present_addr1,personnela.present_addr2,ass_pre.assemblyname As pre_ass,\r\n \tass_per.assemblyname As per_ass,ass_ofc.assemblyname As post_ass\r\n\tFrom personnela Inner Join office On personnela.officecd = office.officecd\r\n \tInner Join policestation On office.policestn_cd = policestation.policestationcd \r\n \tInner Join subdivision On office.subdivisioncd = subdivision.subdivisioncd\r\n \tInner Join poststat On personnela.poststat = poststat.post_stat\r\n \tInner Join assembly As ass_pre On personnela.assembly_temp = ass_pre.assemblycd \r\n \tInner Join assembly ass_per On personnela.assembly_perm = ass_per.assemblycd\r\n \tInner Join assembly ass_ofc On personnela.assembly_off = ass_ofc.assemblycd\r\n \tInner Join district On district.districtcd = subdivision.districtcd\r\n\tLeft Join termination On personnela.personcd = termination.personal_id "; $sql .= " WHERE termination.personal_id is null and personnela.gender='{$gender}' and personnela.assembly_temp<>'{$assembly}' and personnela.assembly_perm<>'{$assembly}' and personnela.assembly_off<>'{$assembly}' and personnela.poststat='{$posting_status}' "; $sql .= " and (personnela.booked='' or personnela.booked is null) and personnela.forpc='{$forpc}'"; $sql .= " limit 1 offset {$random_no}"; $rs = execSelect($sql); connection_close(); return $rs; }
function amplifyCell(&$record, $dummy = NULL) { switch ($record['realm']) { case 'object': $record['ports'] = getObjectPortsAndLinks($record['id']); $record['ipv4'] = getObjectIPv4Allocations($record['id']); $record['ipv6'] = getObjectIPv6Allocations($record['id']); $record['nat4'] = getNATv4ForObject($record['id']); $record['files'] = getFilesOfEntity($record['realm'], $record['id']); break; case 'file': $record['links'] = getFileLinks($record['id']); break; case 'location': $record['locations'] = getLocations($record['id']); $record['rows'] = getRows($record['id']); break; case 'row': $record['racks'] = getRacks($record['id']); case 'rack': $record['mountedObjects'] = array(); // start with default rackspace for ($i = $record['height']; $i > 0; $i--) { for ($locidx = 0; $locidx < 3; $locidx++) { $record[$i][$locidx]['state'] = 'F'; } } // load difference $query = "select unit_no, atom, state, object_id " . "from RackSpace where rack_id = ? and " . "unit_no between 1 and ? order by unit_no"; $result = usePreparedSelectBlade($query, array($record['id'], $record['height'])); global $loclist; $mounted_objects = array(); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $record[$row['unit_no']][$loclist[$row['atom']]]['state'] = $row['state']; $record[$row['unit_no']][$loclist[$row['atom']]]['object_id'] = $row['object_id']; if ($row['state'] == 'T' and $row['object_id'] != NULL) { $mounted_objects[$row['object_id']] = TRUE; } } $record['mountedObjects'] = array_keys($mounted_objects); unset($result); break; case 'vst': $record['rules'] = array(); $record['switches'] = array(); $result = usePreparedSelectBlade('SELECT rule_no, port_pcre, port_role, wrt_vlans, description ' . 'FROM VLANSTRule WHERE vst_id = ? ORDER BY rule_no', array($record['id'])); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $record['rules'][$row['rule_no']] = $row; } unset($result); $result = usePreparedSelectBlade('SELECT object_id, domain_id FROM VLANSwitch WHERE template_id = ?', array($record['id'])); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $record['switches'][$row['object_id']] = $row; } break; default: } }
?> " class="open_close" id="close_in"><i class="icon_set_1_icon-77"></i></a> <ul> <li <?php echo basename($_SERVER['PHP_SELF']) == 'index.php' ? ' class="active"' : ''; ?> class="submenu"> <a href="<?php echo site_url(''); ?> " class="show-submenu">Home</a> </li> <li class="submenu"> <a href="javascript:void(0);" class="show-submenu">Tours Packages <i class="icon-down-open-mini"></i></a> <?php $category_where = array('is_deleted' => 'N', 'is_active' => 'Y'); $category_rows_data = getRows(DB_TABLE_PREFIX . 'category', $category_where, "*", 'sort_order'); $category_data = $category_rows_data['data']; if ($category_rows_data['total_recs'] > 0) { ?> <ul> <li<?php echo basename($_SERVER['PHP_SELF']) == 'all_tours_list.php' ? ' class="active"' : ''; ?> ><a href="<?php echo site_url(''); ?> all_tours_list.php">All tours list</a></li> <?php foreach ($category_data as $side_bar_category) {
<td colspan="2"> </td> </tr> <tr> <td align="left">Polling Party No:</td> <td align="left"><input type="text" name="polling_party_no" id="polling_party_no" style="width:142px;" onchange="return personnel_list();" /></td><td colspan="2"> </td> </tr> <tr> <td align="left">Post Status:</td> <td align="left" colspan="3"><select id="posting_status" name="posting_status" onchange="return personnel_list();" style="width:150px;"> <option value="0">-Select Posting Status-</option> <?php $rsP = fatch_postingstatus(); $num_rows = rowCount($rsP); if ($num_rows > 0) { for ($i = 1; $i <= $num_rows; $i++) { $rowP = getRows($rsP); echo "<option value='{$rowP['0']}'>{$rowP['1']}</option>\n"; } } $rsP = null; $num_rows = 0; $rowP = null; ?> </select></td> </tr> <tr> <td align="left"><b>Personnel ID:</b></td> <td align="left"><span id="personnel_list"><select id="p_id" name="p_id" style="width:150px;" onchange="fatch_personnel_dtl(this.value);"></select> </span></td> <td align="left"><b>Office ID:</b></td> <td align="left" width="60px"><span id="ofc_id"></span></td>
<table width="100%"> <tr><input type="hidden" id="hid_subdiv" value="<?php print $subdiv_cd; ?> " /> <td align="left">Parliamentary Constituency</td> <td align="left"><select name="PC" id="PC" style="width:180px;" onchange="return PC_change(this.value);"> <option value="0">-Select PC-</option> <?php $districtcd = $dist_cd; include_once 'function/form_12_fun.php'; $rsPC = fatch_PC_ag_dist($districtcd); $num_rows = rowCount($rsPC); if ($num_rows > 0) { for ($i = 1; $i <= $num_rows; $i++) { $rowPC = getRows($rsPC); echo "<option value='{$rowPC['0']}'>{$rowPC['1']}</option>\n"; $rowPC = null; } } $rsPC = null; $num_rows = 0; ?> </select> </td> <td rowspan="2" width="50px">OR</td> </tr> <tr> <td align="left">Assembly Constituency</td> <td align="left" id="assembly_result"><select name="assembly" id="assembly" style="width:180px;"></select></td> </tr>
$rows_data_cat = getRows(DB_TABLE_PREFIX . 'category', $where_cat, '*'); $cat_data = $rows_data_cat['data']; $category = $cat_data[0]; ?> <div class="short_info"><i class="icon_set_1_icon-4"></i><?php echo $category['title']; ?> </div></a> </div> </div> <div class="clearfix visible-xs-block"></div> <div class="col-lg-6 col-md-6 col-sm-6"> <div class="tour_list_desc"> <?php $where2 = array('product_id' => $id); $rows_data2 = getRows(DB_TABLE_PREFIX . 'reviews', $where2, '*'); $product_data2 = $rows_data2['data']; if ($rows_data2['total_recs'] > 0) { $total = 0; foreach ($product_data2 as $product) { extract($product); $total_re_overall += $review_overall / 10; ?> <?php } $totalnum = count($product_data2); $re_overall = $total_re_overall / $totalnum * 100; ?>
<?php if (isset($_GET[newsid]) && !empty($_GET[newsid])) { require_once "action/checkAamsLogin.php"; require_once "action/smarty_inc.php"; require_once "action/mysql.class.php"; $query = $db->query("select * from news where id = '{$_GET['newsid']}'"); $info = $db->fetch_array($query); $smarty->assign("newsinfo", $info); $rows = getRows(" news_type where pid=0 ", $db); $smarty->assign("typeRows", $rows); $smarty->display("updatenews.html"); } else { echo "<script>window.history.back();</script>"; exit; }
public function sitemapXML() { static $mlp_installed; if (!isset($mlp_installed)) { $mlp_installed = is_callable('l10n_installed') ? call_user_func('l10n_installed', true) : false; } $out = '<?xml version="1.0" encoding="utf-8"?>'; $out .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; // Homepage $out .= $this->urlXML(hu); // Excluded sections $excluded = $GLOBALS['prefs']['jmd_sitemap_exclude']; $excluded = unserialize($excluded); foreach ($excluded as $key => $value) { $notIn[$key] = "'{$value}'"; } $notIn = implode(',', $notIn); $notIn .= ",'default'"; // List sections $site_langs = array(); if ($mlp_installed) { $site_langs = MLPLanguageHandler::get_site_langs(); } $sections = safe_column("name", "txp_section", "name not in({$notIn})"); foreach ($sections as $section) { if ($mlp_installed) { foreach ($site_langs as $lang) { $lang = substr($lang, 0, 2) . '/'; $loc = hu . $lang . urlencode($section) . '/'; $out .= $this->urlXML($loc); } } else { $loc = pagelinkurl(array('s' => $section)); $out .= $this->urlXML($loc); } } // Articles $fields = 'ID as thisid, Section as section, Title as title, url_title, unix_timestamp(Posted) as posted, unix_timestamp(LastMod) as lastmod'; if ($mlp_installed) { $fields .= ', l10n_lang'; } $articles = getRows("select {$fields} from " . safe_pfx('textpattern') . " where Status = 4 and Posted<= now() and section not in({$notIn})"); if ($articles) { include_once txpath . '/publish/taghandlers.php'; foreach ($articles as $article) { $loc = permlinkurl($article); if ($mlp_installed) { $loc = str_replace(hu, hu . substr($article['l10n_lang'], 0, 2) . '/', $loc); } $lastmod = date('c', $article['lastmod']); $out .= $this->urlXML($loc, $lastmod); } } $out .= '</urlset>'; return $out; }
public function isSquare() { return getRows() == getCols(); }
<?php function getRows($file) { $handle = fopen($file, 'rb'); if ($handle === false) { throw new Exception(); } while (feof($handle) === false) { (yield fgetcsv($handle)); } fclose($handle); } foreach (getRows('data.csv') as $row) { print_r($row); }
function getThings($query, $debug = '') { $rs = getRows($query, $debug); if ($rs) { foreach ($rs as $a) { $out[] = array_shift($a); } return $out; } return array(); }
include_once "action/smarty_inc.php"; include_once "action/lang.class.php"; include_once "action/mysql.class.php"; include_once "action/public_info.php"; if ($currlang == "en") { include_once "action/page.class.en.php"; } else { include_once "action/page.class.php"; } $where = " where remark='Honour' and seq is null "; //分页 $pagesize = 12; //一页显示多少条 $queryTotal = $db->query("select id from cp " . $where); $total = $db->db_num_rows(); pageft($total, $pagesize); if ($firstcount < 0) { $firstcount = 0; } //显示分页的内容 $smarty->assign("page", $pagenav); //产品 $certRow = getRows("cp " . $where . "order by create_date desc limit {$firstcount}, {$displaypg} ", $db, "id,cp_info_type_" . $currlang . " as cert_name,path"); $smarty->assign("certRows", $certRow); //联系我们ContactUs $contactusInfo = getInfo("cp where remark='ContactUs'", $db, "cp_info_value_" . $currlang . " as info"); $smarty->assign("contactUsInfo", html_entity_decode($contactusInfo[info])); $aboutUsInfoAll = getInfo("cp where remark='AboutUs'", $db, "cp_info_value_" . $currlang . " as info"); $smarty->assign("AboutUsInfoAll", html_entity_decode($aboutUsInfoAll[info])); $smarty->display("cert.html");
<?php //²Ëµ¥ $menulist = getRows("menu where menu_type='PublicTopNav' order by menu_index", $db, " id,menu_url,menu_name_" . $currlang . " as menu_name "); $smarty->assign("menulist", $menulist); //µ×²¿µ¼º½ $nav_buttom_info = getInfo("comm_code where type_name='ButtomNavInfo'", $db, "type_value_" . $currlang . " as type_value"); $smarty->assign("ButtomNavInfo", html_entity_decode($nav_buttom_info[type_value])); //°æȨÐÅÏ¢ $copy_buttom_info = getInfo("comm_code where type_name='ButtomCopyInfo'", $db, "type_value_" . $currlang . " as type_value"); $smarty->assign("ButtomCopyInfo", html_entity_decode($copy_buttom_info[type_value])); ////modify by 1-8 flashÇл» $flashPic = getRows("comm_code where type_name='TopFlashImage' order by remark", $db); $smarty->assign("TopFlashImage", $flashPic); //ÓïÑÔ if ($currlang == "en") { $clang = 'en'; } else { $clang = ''; } $smarty->assign("clang", $clang); $url = $_SERVER["REQUEST_URI"]; $smarty->assign("CURL", $url); $smarty->assign("lang", $lang[$currlang]['public']);
function getSubCategory($collapse_number, $product_category) { global $con; $sql = "SELECT * FROM category"; $unique_brands = getRows('DISTINCT pro_brand', 'products WHERE pro_category="' . $product_category . '"'); echo '<div class="collapse" id="collapse' . $collapse_number . '">'; getBrand($product_category, $unique_brands); echo '</div>'; }
if (!safe_field('name', 'txp_prefs', "name = 'doctype'")) { safe_insert('txp_prefs', "prefs_id = 1, name = 'doctype', val = 'xhtml', type = '0', event = 'publish', html = 'doctypes', position = '190'"); } // publisher's email address if (!safe_field('name', 'txp_prefs', "name = 'publisher_email'")) { safe_insert('txp_prefs', "prefs_id = 1, name = 'publisher_email', val = '', type = 1, event = 'admin', position = 115"); } // goodbye raw ?php support if (safe_field('name', 'txp_prefs', "name = 'allow_raw_php_scripting'")) { safe_delete('txp_prefs', "name = 'allow_raw_php_scripting'"); } safe_alter('txp_users', "MODIFY RealName VARCHAR(255) NOT NULL default '', MODIFY email VARCHAR(254) NOT NULL default ''"); // Remove any setup strings from lang table safe_delete('txp_lang', "event='setup'"); $has_idx = 0; $rs = getRows('show index from `' . PFX . 'textpattern`'); foreach ($rs as $row) { if ($row['Key_name'] == 'url_title_idx') { $has_idx = 1; } } if (!$has_idx) { safe_query('alter ignore table `' . PFX . 'textpattern` add index url_title_idx(`url_title`)'); } // Remove is_default from txp_section table and make it a preference if (!safe_field('name', 'txp_prefs', "name = 'default_section'")) { $current_default_section = safe_field('name', 'txp_section', 'is_default=1'); safe_insert('txp_prefs', "prefs_id = 1, name = 'default_section', val = '" . doSlash($current_default_section) . "', type = '2', event = 'section', html = 'text_input', position = '0'"); } $cols = getThings('describe `' . PFX . 'txp_section`'); if (in_array('is_default', $cols)) {
</tr> <tr> <td align="left"><span class="error">*</span>Sl. No. Range</td> <td align="left"><input type="text" name="start_sl" id="start_sl" style="width:50px" /> To: <input type="text" name="end_sl" id="end_sl" style="width:50px;" /></td> </tr> <tr> <td align="left"><span class="error">*</span>Venue</td> <td align="left"><select name="venue" id="venue" style="width:180px;"> <option value="0">-Select Training Venue-</option> <?php $rsTrainingVenue = fatch_training_venue2_ag_subdiv(''); $num_rows = rowCount($rsTrainingVenue); if ($num_rows > 0) { for ($i = 1; $i <= $num_rows; $i++) { $rowTrainingVenue = getRows($rsTrainingVenue); echo "<option value='{$rowTrainingVenue['0']}'>{$rowTrainingVenue['1']}</option>\n"; $rowTrainingVenue = NULL; } } unset($rowTrainingVenue, $num_rows); ?> </select> </td> </tr> <tr> <td align="left"><span class="error">*</span>Training Date</td> <td align="left"><input type="text" name="training_dt" id="training_dt" maxlength="10" style="width:180px;" /></td> </tr> <tr> <td align="left"><span class="error">*</span>Training Time</td>
<td colspan="4" align="center"><input type="submit" name="submit" id="submit" value="Save" class="button" onclick="javascript:return validate();" /></td> </tr> <tr><td colspan="4" align="left"><div id="form1_errorloc" class="error"></div></td></tr> <tr><td colspan="4" align="center"><div class="scroller"> <?php //include_once('function/training_fun.php'); if (isset($rsBranch)) { unset($rsBranch, $rowBranch, $num_rows); } $rsBranch = fatch_branch_master('', $dist_cd); $num_rows = rowCount($rsBranch); if ($num_rows > 0) { echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' id='table1'>\n"; echo "<tr height='30px'><th align='center'>Sl. No</th><th align='center'>Bank Code</th><th align='left'>Branch IFSC</th><th align='left'>Branch Name</th><th align='left'>Branch Address</th><th>Edit</th><th>Delete</th></tr>\n"; for ($i = 1; $i <= $num_rows; $i++) { $rowBranch = getRows($rsBranch); $branch_cd = '"' . encode($rowBranch['branchcd']) . '"'; $bank_cd = '"' . encode($rowBranch['bank_cd']) . '"'; echo "<tr><td width='5%' align='right'>{$i}.</td><td align='center' width='15%'>{$rowBranch['bank_cd']}</td><td width='15%' align='left'>{$rowBranch['ifsc_code']}</td>"; echo "<td width='25%' align='left'>{$rowBranch['branch_name']}</td><td width='35%' align='left'>{$rowBranch['address']}</td>"; echo "<td align='center' width='10%'><img src='images/edit.png' alt='' height='20px' onclick='javascript:edit_branch({$branch_cd},{$bank_cd});' /></td>\n"; echo "<td align='center' width='10%'><img src='images/delete.png' alt='' height='20px' onclick='javascript:delete_branch({$branch_cd},{$bank_cd});' /></td></tr>\n"; unset($rowBranch, $branch_cd, $bank_cd); } echo "</table>\n"; } else { echo "<div id='table1' style='border: 1px solid;'>No records found</div>"; } unset($rsBlock, $num_rows, $rowBlock); ?> </div>
<?php include_once "action/smarty_inc.php"; include_once "action/lang.class.php"; include_once "action/mysql.class.php"; include_once "action/public_info.php"; include_once "action/page.class.php"; //栏目类型--课程 $lmlist = getRows("boya_type where pid='2' order by seq", $db, " id,type_name as name,url,seq as typeid "); $smarty->assign("lmlist", $lmlist); //联系我们 $infocn = getInfo(" boya_config where comm_type='Contact'", $db); $smarty->assign("infocn", $infocn); $infocn_type = getInfo(" boya_type where id='4'", $db); $smarty->assign("infocn_type", $infocn_type); $smarty->display("lxwm.html");
$page = $_GET['p']; $section = 'training-allocation-list'; if ($page < "1") { $page = "0"; } $p_num = $items * $page; $rstraining_alloc_list = fatch_training_allocation_listAct($sub_div, $training_type, $training_venue, $frmdt, $todt, $usercode, $p_num, $items); $num_rows = rowCount($rstraining_alloc_list); if ($num_rows < 1) { echo "No record found"; //echo $officeid.",".$officename.",".$frmdt.",".$todt.",".$usercode; } else { echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' id='table1'>\n"; echo "<tr height='30px'><th>Sl.</th><th>Training Venue</th>\r\n\t\t\t\t<th>Date</th>\r\n\t\t\t\t<th>Time</th>\r\n\t\t\t\t<th>Post Status</th>\r\n\t\t\t\t<th>No of PP</th>\r\n\t\t\t\t<th>Delete</th></tr>\n"; for ($i = 1; $i <= $num_rows; $i++) { $rowTraining_alloc_list = getRows($rstraining_alloc_list); $schedule_code = '"' . encode($rowTraining_alloc_list['schedule_code']) . '"'; echo "<tr><td align='right' width='4%'>{$i}.</td><td align='left' width='30%'>{$rowTraining_alloc_list['venuename']}</td><td width='15%' align='center'>{$rowTraining_alloc_list['training_dt']}</td>"; echo "<td width='15%' align='left'>{$rowTraining_alloc_list['training_time']}</td><td width='15%' align='left'>{$rowTraining_alloc_list['poststatus']}</td>"; echo "<td width='10%' align='left'>{$rowTraining_alloc_list['no_pp']}</td>"; echo "<td align='center' width='5%'><img src='images/delete.png' alt='' height='20px'"; if ($rowTraining_alloc_list['usercode'] == $usercode) { echo " onclick='javascript:delete_training_allocation({$schedule_code});' "; } else { echo " onclick='alert(\"You do not have sufficient privilege to do the operation\");'"; } echo " /></td></tr>\n"; $rowTraining_alloc_list = NULL; } echo "</table>\n"; paging();
function assembly_party_del_check($ass, $no) { $sql = "Select count(*) as cnt From dcrcmaster where assemblycd='{$ass}' and no_of_member='{$no}'"; $rs = execSelect($sql); $row = getRows($rs); $cnt = $row['cnt']; //$sql1="delete from assembly_party where assemblycd='$ass' and no_of_member='$no'"; //$i=execDelete($sql1); connection_close(); return $cnt; }
if (!in_array('flags', $cols)) { safe_alter('txp_plugin', "ADD flags SMALLINT UNSIGNED NOT NULL DEFAULT 0"); } // Default theme. if (!safe_field('name', 'txp_prefs', "name = 'theme_name'")) { safe_insert('txp_prefs', "prefs_id = 1, name = 'theme_name', val = 'classic', type = '1', event = 'admin', html = 'themename', position = '160'"); } safe_alter('txp_plugin', 'CHANGE code code MEDIUMTEXT NOT NULL, CHANGE code_restore code_restore MEDIUMTEXT NOT NULL'); safe_alter('txp_prefs', 'CHANGE val val TEXT NOT NULL'); // Add author column to files and links, // Boldy assuming that the publisher in charge of updating this site is the author of any existing content items. foreach (array('txp_file', 'txp_link') as $table) { $cols = getThings('describe `' . PFX . $table . '`'); if (!in_array('author', $cols)) { safe_alter($table, "ADD author varchar(255) NOT NULL default '', ADD INDEX author_idx (author)"); safe_update($table, "author='" . doSlash($txp_user) . "'", '1=1'); } } // Add indices on author columns. foreach (array('textpattern' => 'AuthorID', 'txp_image' => 'author') as $table => $col) { $has_idx = 0; $rs = getRows('show index from `' . PFX . $table . '`'); foreach ($rs as $row) { if ($row['Key_name'] == 'author_idx') { $has_idx = 1; } } if (!$has_idx) { safe_query('ALTER IGNORE TABLE `' . PFX . $table . '` ADD INDEX author_idx(' . $col . ')'); } }
<tr> <td align="left" colspan="4"> </td></tr> <tr> <td colspan="4" align="center"><input type="submit" name="submit" id="submit" value="Save" class="button" onclick="javascript:return validate();" /></td> </tr> <tr><td colspan="4" align="left"><div id="form1_errorloc" class="error"></div></td></tr> <tr><td colspan="4" align="center"><div class="scroller"> <?php //include_once('function/training_fun.php'); $rsBlock = fatch_block_muni_master('', $dist_cd); $num_rows = rowCount($rsBlock); if ($num_rows > 0) { echo "<table width='100%' cellpadding='0' cellspacing='0' border='0' id='table1'>\n"; echo "<tr height='30px'><th align='center'>Sl. No</th><th align='center'>Block/Municipality Code</th><th align='left'>Block/Municipality Name</th><th align='left'>Subdivision</th><th>Edit</th><th>Delete</th></tr>\n"; for ($i = 1; $i <= $num_rows; $i++) { $rowBlock = getRows($rsBlock); $blockminicd = '"' . encode($rowBlock['blockminicd']) . '"'; echo "<tr><td width='5%' align='right'>{$i}.</td><td align='center' width='20%'>{$rowBlock['blockminicd']}</td><td width='30%' align='left'>{$rowBlock['blockmuni']}</td>"; echo "<td width='30%' align='left'>{$rowBlock['subdivision']}</td>"; echo "<td align='center' width='10%'><img src='images/edit.png' alt='' height='20px' onclick='javascript:edit_block({$blockminicd});' /></td>\n"; echo "<td align='center' width='10%'><img src='images/delete.png' alt='' height='20px' onclick='javascript:delete_block({$blockminicd});' /></td></tr>\n"; } echo "</table>\n"; } else { echo "<div id='table1' style='border: 1px solid;'>No records found</div>"; } unset($rsBlock, $num_rows, $rowBlock); ?> </div> </td></tr> </table>
$rowId = getRows($rsId); $rsApp = first_appointment_letter_hdr($rowId['per_code']); if (rowCount($rsApp) == 0) { echo "Appointment Letter not available. </td></tr></table></div></body></html>"; exit; } $rowApp = getRows($rsApp); $token_no = substr($rowApp['pp_subdivision'], 0, 4) . "/" . $rowApp['post_stat'] . "/" . $rowApp['token']; echo "<table width='750'>\r\n <tr>\r\n <td align='left'><div style='border:1px solid; width:150px;text-align:center;'>ELECTION URGENT</div></td>\r\n\t<td align='right'><div style='border:0px solid; width:250px;text-align:center;'>Token No. {$token_no}</div></td>\r\n </tr>\r\n</table>\r\n<p align='center'><strong><u>ORDER OF APPOINTMENT FOR TRAINING</u></strong><br />\r\n<u>{$env}</u></p>\r\n<table cellspacing='0' cellpadding='0' width='750'>\r\n <tr>\r\n <td width='70%' align='left'>Order No: {$_SESSION['apt1_orderno']}</td>\r\n <td width='20%' align='right'>Date: </td>\r\n\t<td width='10%' align='left'> {$_SESSION['apt1_date']}</td>\r\n </tr>\r\n</table>\r\n<table cellspacing='0' cellpadding='0' width='750'>\r\n\t<tr><td>\r\n<p> In exercise of the power conferred upon vide Section 26 of the R. P. Act, 1951, I do hereby appoint the officer specified below as {$rowApp['poststatus']} for undergoing training in connection with the conduct of General Election to House of People, 2014 from {$rowApp['forpc']}-{$rowApp['pcname']} .</p>"; //from $rowApp[forpc]-$rowApp[pcname] PC echo "</td></tr>\r\n</table>\r\n<div align='center'>\r\n <table width='600px' border='1' cellspacing='0' cellpadding='0'>\r\n <tr>\r\n <td align='center'><strong>Name of Polling Officer</strong></td>\r\n </tr>\r\n <tr>\r\n <td align='left'>{$rowApp['officer_name']}, {$rowApp['person_desig']} <b>PIN-{$rowApp['personcd']}</b>\r\n <br />{$rowApp['office']}, {$rowApp['address1']}, {$rowApp['address2']}, P.O.-{$rowApp['postoffice']}, Subdiv-{$rowApp['subdivision']}, P.S.-{$rowApp['policestation']}, Dist.-{$rowApp['district']}, PIN-{$rowApp['pin']}\r\n <br /><br /><br />({$rowApp['officecd']}) <b>{$rowApp['poststatus']}</b>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>\r\n<div align='center'><table width='600px'><tr><td align='left'>The Officer should report for Training as per following Schedule.</td></tr></table></div>\r\n<div align='center'><br />\r\n <table width='730px' border='1' cellspacing='0' cellpadding='0'>\r\n <tr>\r\n <td colspan='5' align='center'><strong>Training Schedule</strong></td>\r\n </tr>\r\n <tr>\r\n <td width='20%'><strong>Training</strong></td>\r\n <td width='25%'><strong>Venue</strong></td>\r\n <td width='27%'><strong>Address</strong></td>\r\n <td width='12%'><strong>Date</strong></td>\r\n <td width='15%'><strong>Time</strong></td>\r\n </tr>"; $office_address = $rowApp['address1'] . ", " . $rowApp['address2']; $rsAppDtl = first_appointment_letter($rowApp['personcd']); if (rowCount($rsAppDtl) > 0) { for ($j = 1; $j <= rowCount($rsAppDtl); $j++) { $rowAppDtl = getRows($rsAppDtl); echo "<tr>\r\n\t\t\t <td height='70'>{$rowAppDtl['training_desc']}</td>\r\n\t\t\t <td>{$rowAppDtl['venuename']}</td>\r\n\t\t\t <td>{$rowAppDtl['venueaddress1']}, {$rowAppDtl['venueaddress2']}</td>\r\n\t\t\t <td>{$rowAppDtl['training_dt']}</td>\r\n\t\t\t <td>{$rowAppDtl['training_time']}</td>\r\n\t\t\t</tr>"; $training_desc = $rowAppDtl['training_desc']; $venuename = $rowAppDtl['venuename']; $venue_add = $rowAppDtl['venueaddress1'] . ", " . $rowAppDtl['venueaddress2']; $training_dt = $rowAppDtl['training_dt']; $training_time = $rowAppDtl['training_time']; mysqli_stmt_bind_param($stmt, 'ssssssssssssssssssssssssssssss', $rowApp['officer_name'], $rowApp['person_desig'], $rowApp['personcd'], $rowApp['officer_desig'], $office_address, $rowApp['postoffice'], $rowApp['subdivision'], $rowApp['policestation'], $rowApp['district'], $rowApp['pin'], $rowApp['officecd'], $rowApp['poststatus'], $rowApp['mob_no'], $training_desc, $venuename, $venue_add, $training_dt, $training_time, $rowApp['forpc'], $rowApp['pcname'], $rowApp['forsubdivision'], $rowApp['epic'], $rowApp['acno'], $rowApp['partno'], $rowApp['slno'], $rowApp['bank_name'], $rowApp['branch_name'], $rowApp['bank_acc_no'], $rowApp['ifsc_code'], $token_no); mysqli_stmt_execute($stmt); $rowAppDtl = NULL; } unset($rsAppDtl); } else { $training_desc = ''; $venuename = ''; $venue_add = '';
<?php require_once "action/checkAamsLogin.php"; require_once "action/smarty_inc.php"; require_once "../action/mysql.class.php"; $infoen = getRows(" comm_code where type_name='ContactUsInfo'", $db, " type_value_en "); $smarty->assign("infoen", html_entity_decode($infoen[0][type_value_en])); $infocn = getRows(" comm_code where type_name='ContactUsInfo'", $db, " type_value_zh_cn "); $smarty->assign("infocn", html_entity_decode($infocn[0][type_value_zh_cn])); //print_r($infocn[0]); $smarty->display("contactusall.html");
public function testAsyncQuery() { $job = AsyncQuery(self::$bigquery, self::$projectId, self::$shakespeareQuery); $job = pollJob(self::$bigquery, $job->getJobReference()->getProjectId(), $job->getJobReference()->getJobId(), 2000); $rows = getRows(self::$bigquery, $job->getJobReference()->getProjectId(), $job->getJobReference()->getJobId()); $this->assertTrue($this->isShakespeare($rows)); }