{ $search_query .= " AND Charges='$Charges' "; } /* First_Name ='$Name' or Last_Name='$Name' or CID='$CID' or Citation_Number='$Citation_Number' or Case_Number='$Case_Number' or Violation_Date='$Violation_Date' or Charges='$Charges' "; */ $search_query .=" ORDER BY id DESC "; $rowsPerPage=10; $result_select1=mysql_query($search_query) or die(mysql_error()); $result_select1_num1=mysql_num_rows($result_select1); $maxPage = ceil($result_select1_num1/$rowsPerPage); $pager = new PS_Pagination($conn, $search_query, $rowsPerPage, 5, "Submit_Search=Submit_Search1&CID=$CID&Name=$Name&Citation_Number=$Citation_Number&Case_Number=$Case_Number&Violation_Date=$Violation_Date&Court_Date=$Court_Date&Charges=$Charges"); //$pager->setDebug(true); $rs = $pager->paginate(); if($rs>0) { $i=0; while($search_result_row=mysql_fetch_assoc($rs)) { if($i % 2 == 0){ ?> <tr bgcolor="#d9d9d9"> <td><?php echo stripslashes($search_result_row['CID']);?> </td> <td><?php echo stripslashes($search_result_row['First_Name']);?> <?php echo stripslashes($search_result_row['Last_Name']);?></td> <td><?php echo stripslashes($search_result_row['Address']);?> </td>
/* echo $db_date = "2012-06-29 00:44:53"; echo "<br>"; $new_format_date = date("d-m-Y h:i:s", strtotime($db_date)); echo $new_format_date; */ $date_from = $_REQUEST['date_from']; $date_to = $_REQUEST['date_to']; $CID = $_REQUEST['CID']; $sql_search_query1 = "SELECT * FROM orders where paidon>='{$date_from}' and paidon<='{$date_to}'"; $sql_search_query1 .= "ORDER BY oid DESC "; $rowsPerPage = 10; $result_select1 = mysql_query($sql_search_query1) or die(mysql_error()); $result_select1_num1 = mysql_num_rows($result_select1); $maxPage = ceil($result_select1_num1 / $rowsPerPage); $pager = new PS_Pagination($conn, $sql_search_query1, $rowsPerPage, 5, "date_from={$date_from}&date_to={$date_to}&CID={$CID}"); //$pager->setDebug(true); $rs = $pager->paginate(); //if(!$rs) die(mysql_error()); if (isset($_REQUEST['Submit_Repots'])) { /* //echo $_REQUEST['Submit_Repots']; $db_date = "2012-06-29 00:44:53"; $new_format_date = date("d-m-Y h:i:s", strtotime($db_date)); echo $new_format_date; */ $date_from = $_REQUEST['date_from']; $date_to = $_REQUEST['date_to']; $CID = $_REQUEST['CID']; /* $sql_search_query1="SELECT * FROM orders where paidon>='$date_from' and paidon<='$date_to'";
$page = 1; } include 'include/classpaging.php'; $sql = "SELECT * FROM surat_masuk WHERE status=0"; if ($key != '') { $sql .= " AND (no_surat like '%{$key}%' or perihal like '%{$key}%' or no_agenda like '%{$key}%')"; } if ($tgl_surat != '') { $sql .= " AND tgl_surat='{$tgl_surat}'"; } $sql .= " order by surat_id DESC"; $link = 'index.php?_mod=sekretariat&task=admin_surat_baru&act=go&key=' . $key . '&tgl_surat=' . $tgl_surat; //echo $sql; $row_perpage = 10; $jml = mysql_num_rows(mysql_query($sql)); $pager = new PS_Pagination($conn, $sql, $row_perpage, 5, $link); $rs = $pager->paginate(); //echo "Cari Surat Masuk >> </br></br>"; $send_url = "index.php?_mod={$_mod}&task=admin_surat_baru"; ?> <!--<table border=0 width="100%" style="border:1px solid #cccccc"><tr><td>--> <!--<form action="index.php" method="get" name="form">--> <!-- <table>--> <!-- <tr><td width="150px">Perihal/Nomor Agenda/No surat/Tanggal</td><td><input type="text" name="key" value="" size="35"/></td></tr>--> <!-- <tr><td width="150px">Tanggal Surat</td>--> <!-- <td><input type="text" name="tgl_surat" value="" size="10"/><script language="JavaScript">--> <!-- new tcal ({--> <!-- 'formname': 'form',--> <!-- 'controlname': 'tgl_surat'--> <!-- });--> <!-- </script>-->
<td colspan="7" bgcolor="#eb5aa3" class="head_text_admin" height="25">Sub Branches</td> </tr> <tr bgcolor="#000000"> <td class="style3" height="25" align="left" >Branch</td> <td class="style3" height="25" align="left" >Sub Branch</td> <td class="style3" height="25" align="center" width="100" nowrap="nowrap"> Action</td> </tr> <?php $row_count = 1; $SQL_Query = "SELECT * FROM tbl_sub_branches order by branch_id"; $result = mysql_query($SQL_Query); $count = mysql_num_rows($result); if ($count != 0) { $pager = new PS_Pagination($conn, $SQL_Query, 10, 200, ""); $pager->setDebug(true); $rs = $pager->paginate(); while ($row_user = mysql_fetch_assoc($rs)) { $sql_branch = "select branch_name from tbl_branch_master where branch_id=" . $row_user['branch_id']; $result_branch = mysql_query($sql_branch); $row_branch = mysql_fetch_assoc($result_branch); ?> <tr height="20"<?php if ($row_count % 2 == 0) { echo 'bgcolor="#F7F7F7"'; } ?> >
</li></ul> </div> <!--/Pagination-----------> </div> <?php } else { echo '<h3>No transaction</h3>'; } } ?> <?php if ($_GET['t'] == 'ownerTransaction') { $owner_id = $_SESSION['user']['id']; $query = payment::payment_by_user($owner_id); $res_trans_object = new PS_Pagination($conn, $query, 10, 5, "type=transaction&t=ownerTransaction"); $res_trans = $res_trans_object->paginate(); // if All messages seleted if (mysql_num_rows($res_trans) > 0) { ?> <div class="dashboardinbox"> <div class="dasbmessagesbdr fontbld font18"> <div class="datediv">S.No</div> <div class="inboxcnt">Item</div> <div class="datediv">Renter</div> <div class="datediv pL20">Amount</div> <div class="datediv">Date</div> </div> <?php
<table width ='685' align ='center' cellpadding ='2' cellspacing ='2' border ='0'> <tr> <td align ='center' valign ='top' class='table_text error'> <?php if (isset($_COOKIE['msg'])) { echo $_COOKIE['msg']; setcookie('msg', ''); } ?> </td> </tr> <tr> <td valign ='top' align ='left'> <?php $sql = "SELECT id,page_name,templates_id,created_on,upload_url FROM sp_squeeze_pages_1 WHERE users_id='" . $user_session_id . "' UNION SELECT id,page_name,templates_id,created_on,upload_url FROM sp_squeeze_pages_2 WHERE users_id='" . $user_session_id . "' UNION SELECT id,page_name,templates_id,created_on,upload_url FROM sp_squeeze_pages_3 WHERE users_id='" . $user_session_id . "' UNION SELECT id,page_name,templates_id,created_on,upload_url FROM sp_squeeze_pages_4 WHERE users_id='" . $user_session_id . "' ORDER BY templates_id,id DESC"; $pager = new PS_Pagination($conn, $sql, REC_PER_PAGE, SHOW_PAGES, ""); $pager->setDebug(false); $rs = $pager->paginate(); if ($rs) { echo "<table border='0' cellspacing='0' cellpadding='0' width='99%'>"; //echo "<tr><td colspan ='6' align ='left' valign ='top' class='table_text'><b>Template ".$templates_id." Total Record : " . $totalRecords . "</b></td></tr>"; echo "<tr class='tableHeader' height='25'><td align ='center' valign ='top' class='largewhite'>No.</td><td class='largewhite' align ='center' valign ='top'>View Page</td><td class='largewhite' align ='left'>Page Name</td><td class='largewhite' align ='left' valign ='top'>Created On</td><td class='largewhite' align ='center' valign ='top'>Edit</td><td class='largewhite' align ='center' valign ='top'>Delete</span></td></tr>"; $counter = 0; $temp_template = ""; while ($row = mysql_fetch_assoc($rs)) { $id = $row['id']; $page_name = ucfirst(strtolower($row['page_name'])); $templates_id = $row['templates_id']; $uploadURL = $row['upload_url']; if ($uploadURL != "") { $pageTitle = "<a href ='{$uploadURL}' target ='_blank' title ='click to view the uploaded page'>{$page_name}</a>";
</tr> <tr valign="top"> <td height="500" colspan="2"> <form action="rfqdetails.php" method="post" name="rfqdetails" id="rfqdetails"> <table border="0" width="100%" class="display" cellpadding="5" cellspacing="1" > <tr> <td colspan="5" align="right"> <?php include 'ps_pagination.php'; $conn = mysql_connect('localhost', 'root', ''); mysql_select_db('hawthorne_nittany', $conn); $currdate = date("m/d/Y"); $sql = "SELECT * FROM `admin_rfq` WHERE isvalid=1"; $result = mysql_query($sql); $pager = new PS_Pagination($conn, $sql, 20, 5); //The paginate() function returns a mysql result set $rs = $pager->paginate(); if (mysql_num_rows($result) > 20) { echo " " . $pager->renderFirst('First') . " "; //Display the link to previous page: << echo $pager->renderPrev('<<'); //Display page links: 1 2 3 echo $pager->renderNav(); //Display the link to next page: >> echo $pager->renderNext(' >>'); //Display the link to last page: Last echo " " . $pager->renderLast('Last'); } ?> </td>
$what = $_GET['q']; $what = trim($what); $where = $_GET['city']; $where = trim($where); $sql = "SELECT b.biz_id AS id,b.title AS title, b.url AS url, c.phone AS phone, l.street AS street, l.city AS city FROM lbs_biz b, lbs_biz_contacts c, lbs_biz_location l, lbs_biz_main_categories m, lbs_biz_sub_categories s\n\tWHERE (b.title LIKE '%{$what}%' || m.name LIKE '%{$what}%' || s.name LIKE '%{$what}%') AND ((l.city LIKE '%{$where}%') || (l.street LIKE '%{$where}%')) AND b.biz_id = c.biz_id AND b.biz_id = l.biz_id AND b.main_category = m.main_category_id AND b.sub_category = s.sub_category_id"; Search::track($what, $where, $user_lat, $user_long); /* * Create a PS_Pagination object * * $conn = MySQL connection object * $sql = SQl Query to paginate * 10 = Number of rows per page * 5 = Number of links * "param1=valu1¶m2=value2" = You can append your own parameters to paginations links */ $pager = new PS_Pagination($sql, 2, 5, "param1=valu1¶m2=value2"); /* * Enable debugging if you want o view query errors */ $pager->setDebug(false); /* * The paginate() function returns a mysql result set * or false if no rows are returned by the query */ $rs = $pager->paginate(); if (!$rs) { $topic = "Found 0 results on <u>" . $what . "</u> in <u>" . $where . "</u>"; } else { $counter = 1; $results = ""; while ($row = mysql_fetch_assoc($rs)) {
} else { $links_page = get_option('blog_url') . substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], "/", 1) + 1); if (strpos($links_page, "&", 1) > 0) { $links_page = substr($links_page, 0, strpos($links_page, '&', 1)); } } } else { $filtered_url = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], "?", 1)); $filtered_url = substr($filtered_url, 0, strripos($filtered_url, "&", 1)); $links_page = $filtered_url; if ($_GET['page_id'] != '') { $links_page = get_option('blog_url') . $links_page; } } //Create a PS_Pagination object $pager = new PS_Pagination($wpdb, $select_files, $nos_pages_admin, $nos_links_admin, $links_page); $result_files = $wpdb->get_results($select_files); $select_cat_name = "SELECT category_name,icon_name FROM " . $table_name_cat . " WHERE cat_id={$cat_id}"; $result_cat_name = $wpdb->get_results($select_cat_name); foreach ($result_cat_name as $cat_name) { $category_name = $cat_name->category_name; $icon_name_cat = $cat_name->icon_name; } $number_files = sizeof($result_files); $blog_url = get_option('blog_url'); $icon_folder = substr(get_option('icon_folder'), strpos(get_option('icon_folder'), '/', 1) + 1); $icon_path_cat = $blog_url . $icon_folder . $icon_name_cat; $counter = 0; ?> <table width=" 450" align="left" cellpadding="0" border="0"> <tr>
} $status = mysql_select_db('newtweets', $conn); if (!$status) { die("Failed to select database!"); } $sql = "SELECT * FROM `tweet` WHERE MATCH(tweet_text) AGAINST('test')"; /* * Create a PS_Pagination object * * $conn = MySQL connection object * $sql = SQl Query to paginate * 10 = Number of rows per page * 5 = Number of links * "param1=valu1¶m2=value2" = You can append your own parameters to paginations links */ $pager = new PS_Pagination($conn, $sql, 10, 5, "param1=valu1¶m2=value2"); /* * Enable debugging if you want o view query errors */ $pager->setDebug(true); /* * The paginate() function returns a mysql result set * or false if no rows are returned by the query */ $rs = $pager->paginate(); if (!$rs) { die(mysql_error()); } while ($row = mysql_fetch_assoc($rs)) { echo $row['image'], "<br />\n"; }
$sql_search .= "(SELECT DISTINCT *,3 as relevance FROM b_movies WHERE ("; while (list($key, $val) = each($split_stemmed)) { if ($val != " " and strlen($val) > 0) { $sql_search .= "(Title LIKE '%{$val}%' OR Starring LIKE '%{$val}%' OR DirectedBy LIKE '%{$val}%') OR"; } } $sql_search = substr($sql_search, 0, strLen($sql_search) - 3); //this will eat the last OR $sql_search .= ") and Status=1)) as tab where AiringDateTime >= '" . date('Y-m-d H:i:s') . "' ORDER BY relevance ASC, AiringDateTime DESC"; $res_search = mysql_query($sql_search); $rowPerpage = 10; $linkPerpage = 8; //ceil($totalrow/$rowPerpage); if (mysql_num_rows($res_search) > 0) { require 'include/ps_pagination.php'; $pager = new PS_Pagination($link, $sql_search, $rowPerpage, $linkPerpage, 'search_name=' . $_GET['search_name'] . ''); $paginationlist = $pager->paginate(); while ($row_search = mysql_fetch_array($paginationlist)) { ?> <div class="container clearfix section group"> <div class="font_content font_block_header shows_font special_font channel_section_header bottom_spacing"></div> </div> <div class="container clearfix section group"> <div class="span_15_of_15 clearfix" style="padding-bottom: 20px;"> <div class="span_4_of_15 special_font" style="float:left;"><a class="shows_font special_font" href="<?php echo getmoviename($row_search['Title'], $row_search['MovieID']); ?> " title="<?php echo $row_search['Title']; ?> "><img src="http://www.hbosouthasia.com/<?php
<?php $query = user::displayItems($user_id); $list_of_items_object = new PS_Pagination($conn, $query, 10, 5, "type=reservation"); $list_of_items_res = $list_of_items_object->paginate(); //$sql=user::displayItems($user_id); //$all_items=mysql_query($sql); if (mysql_num_rows($list_of_items_res) == '0') { echo '<em>NO</em> listings so far'; } else { while ($all_user_item = mysql_fetch_assoc($list_of_items_res)) { $res = itemClass::select_featured_image($all_user_item['id']); //feaure image //get details for reservation $item_res = itemClass::to_get_details_of_reserved_item($all_user_item['id']); $item_reserved = itemClass::users_who_rest_item($all_user_item['id']); $item_res_num = mysql_num_rows($item_reserved); ?> <div class="dasbmessagesbdr"> <div class="swappicdiv"> <img src="<?php echo $URL_SITE; ?> /classes/show_image.php?filename=../images/itemimages/<?php echo $all_user_item['id'] . '/' . $res['filename']; ?> &height=60px&width=100px"> </div> <div class="swaprighttxt"> <div class="swaprighttxtL">
?> <!-- /ALL LISTING ITEM --------------------------------> <!-- ALL STARLISTING ITEM -----------------------------> <?php if (isset($_GET['type']) && $_GET['type'] == 'starlisting' || isset($_POST['type']) && $_POST['type'] == 'starlisting') { if (isset($_GET['listing_items']) && $_GET['listing_items'] == 'all') { $ItemArray = user::getStarItemsId($user_id); if (!empty($ItemArray)) { foreach ($ItemArray as $itemids) { $infoid[] = $itemids; } $query = user::displaystarItemsAllItem($infoid); $list_of_items_object = new PS_Pagination($conn, $query, 10, 5, "type=starlisting&listing_items=all"); $list_of_items = $list_of_items_object->paginate(); $countAllListItem = mysql_num_rows($list_of_items); } } if (empty($ItemArray)) { echo '<br/><em>NO</em> Listing So Far'; } else { ?> <h3 class="dasbmessagesbdr">Starred Items</h3> <?php while ($list_data = mysql_fetch_assoc($list_of_items)) { //print_r($list_data); $item_id = $list_data['id']; $image = itemClass::select_featured_image($list_data['id']); $item_reserve_res = itemClass::to_get_details_of_reserved_item($list_data['id']);
// Feel free to completely clean this entire thing up. // It's put together poorly. $__char_db = ConnectCharacterDatabase(CURRENT_LOCALE); $sql = 'SELECT *, w.world_name, `GetCharacterAccountID`(id) AS account_id FROM `characters` chr LEFT JOIN world_data w ON w.world_id = chr.world_id WHERE NOT job BETWEEN 800 AND 1000 ORDER BY `level` DESC, `exp` DESC'; // top 5 $q = $__char_db->query("\nSELECT *,\n\tw.world_name,\n\t`GetCharacterAccountID`(id) AS account_id\nFROM\n\t`characters` chr\nLEFT JOIN \n\tworld_data w\n\tON\n\t\tw.world_id = chr.world_id\nWHERE NOT\n\tjob BETWEEN 800 AND 1000\nORDER BY\n\tlevel DESC\nLIMIT\n\t0, 5\n"); $pager = new PS_Pagination($__char_db, $sql, 5, 5, ""); $pager->setDebug(true); $rs = $pager->paginate(); ?> <style> .title { font-weight: bold; font-family: Helvetica, sans-serif; font-size: 34px; letter-spacing: 0px; } .more { font-weight: 200;