public function __construct($module,$cols) { $this->cols=$cols; $objHTML=ClsNaanalLibrary::getInstance("html"); $this->objTable=$objHTML->getGenerator()->getTable("search",$cols); //$this->objTable->setParam("border",1); pageHeaderInclude('js/export.js'); pageHeaderInclude('js/searchSaved.js'); pageHeaderInclude('js/suggest.js'); parent::__construct($module); $arrPager=ClsNaanalRequest::getInstance()->getPager(); $pagination=getPagination("index.php?module={$module}", $this->objAuieoModel->getTotalRecords() , $arrPager["current_page"], $arrPager["items_per_page"]); $this->assign("total_records",$this->objAuieoModel->getTotalRecords()); $this->assign("pagination",$pagination); }
public function __construct(ClsAuieoArray &$objAuieoModel) { $this->objAuieoModel=$objAuieoModel; parent::__construct("joborders",7); $rows=$objAuieoModel->getRows(); if($rows>0) { $this->addRowCheckbox(0); $this->addData($this->getSortLink('name', 'Name'),0,0); $this->addData($this->getSortLink('phone1', 'Primary Phone'),0,1); $this->addData("Key Technologies",0,2); $this->addData($this->getSortLink('city', 'Created'),0,3); $this->addData($this->getSortLink('owner_user.last_name', 'Owner'),0,4); for($i=0;$i<$rows;$i++) { $this->addRowCheckbox($i+1,$objAuieoModel->getRenderValue($i,0)); $this->addData($objAuieoModel->getRenderValue($i,1), $i+1, 0); $this->addData($objAuieoModel->getRenderValue($i,2), $i+1, 1); $this->addData($objAuieoModel->getRenderValue($i,3), $i+1, 2); $this->addData($objAuieoModel->getRenderValue($i,4), $i+1, 3); $this->addData($objAuieoModel->getRenderValue($i,5), $i+1, 4); } $this->assign("list",$this->getTable()); } else { $this->assign("list","No matching entries found."); } $arrPager=ClsNaanalRequest::getInstance()->getPager(); $pagination=getPagination("index.php?module=joborders", $rows, $arrPager["current_page"], $arrPager["items_per_page"]); $this->assign("pagination",$pagination); $this->assign("total_records",$rows); $this->assign("filter", ClsJobOrdersFilter::getInstance()->getFilter()); //$this->addData("test",3,3); //$this->addColHeading("good",3); //<input type="checkbox" id="checked_<?php echo($data['contactID']); ? >" name="checked_<?php echo($data['contactID']); ? >" /> }
if ($i != count($list)) { ?> <hr class="forum-list-hr" /> <?php } else { ?> <div class="forum-list-no-hr"></div><?php } } } } else { echo ""; } ?> <div class="pull-right"><?php echo getPagination($totalCount); ?> </div> </section> </div> </div> </div> </div> </div> <div class="col-xs-3"> <div> <div class="right-want-box">
function getUserByReward() { $request = $_REQUEST; if (empty($request)) { return false; } $a = array(); foreach ($request as $key => $value) { ${$key} = mysql_real_escape_string($value); $a[$key] = mysql_real_escape_string($value); } $is_active = empty($is_active) || is_null($is_active) ? 0 : 1; $is_long_list = empty($page) ? true : false; if (!empty($start_date) && !empty($end_date)) { $from = strtotime(trim($start_date)); $to = strtotime(trim($end_date)); $period = "( `p`.`start_date` >= '" . date("Y-m-d", $from) . "' AND `p`.`start_date` <= '" . date("Y-m-d", $to) . "' ) OR ( `p`.`end_date` >= '" . date("Y-m-d", $from) . "' AND `p`.`end_date` <= '" . date("Y-m-d", $to) . "')"; } $total_row = 0; $page_limit = 30; $limit = $is_long_list ? "" : " LIMIT " . ($page - 1) * $page_limit . ",{$page_limit}"; if (!$is_long_list) { $query = " SELECT COUNT(1) AS `total` \n\t\t\t\t\tFROM `" . REVIEW_REWARDER . "` AS `r` \n\t\t\t\t\tINNER JOIN `" . REVIEW_USERS . "` AS `u` ON `u`.`id` = `r`.`receiver_id`\n\t\t\t\t\tINNER JOIN `" . REVIEW_PERIODS . "` AS `p` ON `p`.`id` = `r`.`period_id`\t\n\t\t\t\t\tWHERE ({$period}) AND `u`.`confirmed`= 1 AND `u`.`is_active` = {$is_active} AND `r`.`rewarder_points` > 0\n\t\t\t\t\tGROUP BY `u`.`username`"; if ($result = mysql_query($query)) { $total_row = mysql_num_rows($result); } if ($total_row == 0) { respond(array('success' => true, 'message' => "No reward found", 'rewarderlist' => array(), 'sql' => $query)); } } $query = " SELECT `u`.`username`, `u`.`nickname`, SUM(`r`.`rewarder_points`) AS `points` \n\t\t\t\tFROM `" . REVIEW_REWARDER . "` AS `r` \n\t\t\t\tINNER JOIN `" . REVIEW_USERS . "` AS `u` ON `u`.`id` = `r`.`receiver_id`\n\t\t\t\tINNER JOIN `" . REVIEW_PERIODS . "` AS `p` ON `p`.`id` = `r`.`period_id`\n\t\t\t\tWHERE ( {$period} ) AND `u`.`confirmed`= 1 AND `u`.`is_active` = {$is_active} AND `r`.`rewarder_points` > 0\n\t\t\t\tGROUP BY `u`.`username`\n\t\t\t\tORDER BY {$sort} {$dir} {$limit}"; if (!($result = mysql_query($query))) { respond(array('success' => false, 'message' => SL_DB_FAILURE, 'sql' => $query)); } else { $return = array(); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $return[] = $row; } } if (!empty($return)) { $pagination = ""; if (!$is_long_list) { $total_row = ceil($total_row / $page_limit); $pagination = getPagination($page, $total_row); } respond(array('success' => true, 'rewarderlist' => $return, 'pagination' => $pagination, 'sql' => $query)); } else { respond(array('success' => false, 'message' => 'No users')); } } }
<ul class="pagination pagination-lg"> <?php $npage = getPagination($con, $itemView); $page = getPage(); $cari = @$_GET['cari']; if ($page != 1) { ?> <li> <a href="?<?php if (!empty($cari)) { echo "cari=" . $cari . "&"; } ?> page=<?php echo $page - 1; ?> "> <i class="fa fa-long-arrow-left"></i>Previous Page </a> </li> <?php } for ($i = 1; $i <= $npage; $i++) { ?> <li class="<?php if ($page == $i) { echo "active"; } ?> ">
</header> </article> <?php } ?> <div class="row"> <?php if (function_exists('getPagination')) { ?> <nav class="twelvecol pagination"> <?php echo getPagination(); ?> </nav> <?php } else { ?> <nav class="twelvecol pagination"> <ul> <li class="prev-link"> <?php next_posts_link(__('Older')); ?> </li> <li class="next-link"> <?php previous_posts_link(__('Newer'));
?> ">关注/粉丝</a> </li> </ul> </div> <!-- /.navbar-collapse --> </nav> <div class="row uc_content"> <div class="col-md-7 col-xs-12"> <?php echo $content; ?> <div class="pull-right"> <?php echo getPagination($totalCount, 10); ?> </div> </div> <div class="col-md-5 col-sm-9 col-xs-12 uc_other_link"> <div> <div class="uc_link_block clearfix col-xs-12"> <div class="uc_link_top clearfix"> <div class="uc_title"> <?php if ($uid == is_login()) { ?> 我<?php } else { ?> TA<?php
$datas["niceSize"] = $item[File_List::KEY_TYPE] == File_List::TYPE_FILE ? niceSize($item[File_List::KEY_SIZE]) : ' '; } $datas["path"] = $path; $datas["real_path"] = $real_path; $datas["real_path_urlencode"] = urlencode($real_path); $datas["KEY_TYPE"] = $item[File_List::KEY_TYPE]; $datas["KEY_NAME"] = $item[File_List::KEY_NAME]; $datas["KEY_NAME_htmlsc"] = htmlspecialchars($item[File_List::KEY_NAME]); $datas["KEY_NAME_urlencode"] = urlencode($item[File_List::KEY_NAME]); $datas["KEY_DATE"] = date('d/m/y H:i:s', $item[File_List::KEY_DATE]); $listing_filtred[$xx] = $datas; } $smarty->assign("listing_filtred", $listing_filtred); } $smarty->assign("getLastItemCount", $file_list->getLastItemCount()); $smarty->assign("getPagination", getPagination($file_list->getLastItemCount(), $start, $limit)); $smarty->assign("totPagination", $start + $limit > $file_list->getLastItemCount() ? $file_list->getLastItemCount() : $start + $limit); ////////////////////////// UPLOAD /////////////////////////////// $upload_info = $datas_lang["upload_infoPoids"] . "<br>"; if ($dimMaxArray[0] == 0 && $dimMaxArray[1] == 0) { $upload_info .= $datas_lang["upload_info0"]; } else { if ($dimMaxArray[0] > 0 && $dimMaxArray[1] == 0) { $upload_info .= $datas_lang["upload_info1"]; } if ($dimMaxArray[0] == 0 && $dimMaxArray[1] > 0) { $upload_info .= $datas_lang["upload_info2"]; } if ($dimMaxArray[0] > 0 && $dimMaxArray[1] > 0) { $upload_info .= $datas_lang["upload_info3"]; }
} else { $loFrameId = 1; $hiFrameId = $event['Frames']; } $sql = 'SELECT * FROM Frames WHERE EventID = ?'; if ($paged && !empty($_REQUEST['page'])) { $sql .= " and FrameId between {$loFrameId} and {$hiFrameId}"; } $sql .= " order by FrameId"; $frames = dbFetchAll($sql, NULL, array($_REQUEST['eid'])); $scale = getDeviceScale($event['Width'], $event['Height'], $framesPerLine + 0.3); $pages = (int) ceil($event['Frames'] / $framesPerPage); if (!empty($_REQUEST['fid'])) { $_REQUEST['page'] = $_REQUEST['fid'] / $framesPerPage + 1; } $pagination = getPagination($pages, $_REQUEST['page'], $maxShortcuts, '&eid=' . $_REQUEST['eid'] . $filterQuery . $sortQuery, '&'); xhtmlHeaders(__FILE__, translate('Event') . ' - ' . $event['Name']); ?> <body> <div id="page"> <div id="header"> <?php if (canEdit('Events')) { ?> <div id="headerButtons"> <a href="?view=events&action=delete&mark_eid=<?php echo $_REQUEST['eid']; echo $filterQuery; echo $sortQuery; ?> &limit=<?php
function ListR4($sql, $attr, $link, $SUMMARY_STYLE, $conexion = null) { ## ARRAYS DEFAULT DC $atributosDefault = array('id' => '', 'class' => 'reporteA', 'checked' => '', 'paginador' => '', 'fieldTotal' => ''); $linkDefault = array('campos' => '', 'args' => '', 'panelId' => '', 'url' => ''); $linksUrl = array('head' => '', 'body' => ''); $SUMMARY_STYLE_DEFAULT = array('columns_index' => '', 'summary_css' => ''); ## CHANGING ARRAYS VALUES $atributos = defaultArrayValues($atributosDefault, $attr); $SUMMARY_COLS_CSS = defaultArrayValues($SUMMARY_STYLE_DEFAULT, $SUMMARY_STYLE); $paginador = explode(',', $atributos['paginador']); ////CONSTRUYE PARTE DE LA URL DEL PAGINADOR $urlSeg = explode('?', $paginador[1]); $urlSegA = $urlSeg[1]; $urlSegB = explode('=', $urlSegA); $urlSegUrl = $urlSegB[0]; $paginaStart = is_int((int) get('' . $urlSegUrl . 'pagina-start')) && (int) get('' . $urlSegUrl . 'pagina-start') > 0 ? get('' . $urlSegUrl . 'pagina-start') : 1; $start = ($paginaStart - 1) * $paginador[0]; $limit = ' LIMIT ' . $start . ', ' . $paginador[0]; $sql = filterSql($sql); ## EXTRAYENDO EL TOTAL DE FILAS getResult($sql, $conexion); $count = getResult("SELECT FOUND_ROWS() AS total", $conexion); $row = mysql_fetch_object($count); $countTotal = $row->total; $sql = $sql . $limit; $result = getResult($sql, $conexion); $pagitacionHtml = getPagination($paginaStart, $countTotal, $paginador[0], $paginador[1]); if (!empty($link)) { $linkArray = explode('}', $link); if (isset($linkArray[1])) { $linksUrl['body'] = defaultArrayValues($linkDefault, $linkArray[1]); $linksUrl['head'] = defaultArrayValues($linkDefault, $linkArray[0]); } else { $linksUrl['body'] = defaultArrayValues($linkDefault, $linkArray[0]); } } $fieldsName = getFieldsName($result); $fieldsFilter = fieldsFilter($fieldsName, $linksUrl); //vd($fieldsFilter);vd($atributos); $tableHeader = getTableHeader($fieldsFilter, $atributos); $tableBody = getTableBody($result, $fieldsFilter, $atributos, $countTotal, $SUMMARY_COLS_CSS); $tabla .= "<table id=\"{$atributos['id']}\" class=\"{$atributos['class']}\" style=\"width:100%;clear: both;\">" . "{$tableHeader}{$tableBody}" . "</table>" . "</form>" . "{$pagitacionHtml}"; if ($atributos['checked'] == "checked") { $tabla = "<form method=\"post\" id=\"frm-{$atributos['id']}\">" . $tabla; $tabla .= "</form>"; } return $tabla; }
while ($row = $res->fetch(PDO::FETCH_ASSOC)) { $HTML .= '<tr onclick="window.location.assign(\'/displayinventory/' . $row['id'] . '/\')">'; $HTML .= '<td>' . $row['datetime'] . '</td>'; $HTML .= '<td>' . $row['quantity'] . '</td>'; $HTML .= '<td>' . $row['cost'] . '</td>'; $HTML .= '<td>' . $row['sell_price'] . '</td>'; $HTML .= '<td>' . $row['locname'] . '</td>'; $HTML .= '<td>' . ($row['notes'] != '' ? 'Y' : 'N') . '</td>'; $HTML .= '</tr>'; } } else { $HTML = 'No Data Found'; } $HTML .= '</table></div>'; if ($count > 0) { $paginationCount = getPagination($count); } $HTML .= ''; //Buttons if ($count > 0) { $HTML .= '<div style="display:table; margin:0 auto;"><ul class="tsc_pagination tsc_paginationC tsc_paginationC01">' . '<li class="first link" id="first">' . '<a href="javascript:void(0)" onclick="changePagination(\'0\',\'first\',\'inventory\')"><<</a>' . '</li>'; if ($paginationCount > 18) { $bottomPage = 0; $topPage = 18; if ($id > 9) { $bottomPage = $id - 8; $HTML .= '<li>...</li>'; if ($paginationCount < $id + 9) { $topPage = $paginationCount; $bottomPage = $paginationCount - 18; } else {
$page = empty($_GET['pageno']) ? 1 : $_GET['pageno']; if (!empty($_GET['orderby'])) { $orderBy = $_GET['orderby']; $orderBy = $orderBy == 'author' ? 'user' : $orderBy; } if (!empty($_GET['order'])) { $order = $_GET['order']; } // current link $link = "admin.php?page=s3podcasts-list&orderby={$orderBy}&order={$order}"; // get the number of podcasts in database $count = $wpdb->get_row('SELECT COUNT(id) AS total FROM wp_s3podcasts'); // get all podcasts $results = $wpdb->get_results("SELECT * FROM wp_s3podcasts ORDER BY {$orderBy} {$order} LIMIT " . ($page - 1) * $limit . ", {$limit}"); // get pagination html $pagination = getPagination($link, $count->total, $page, $limit); // init order links $orderTitle = $orderUser = $orderDate = 'asc'; switch ($orderBy) { case 'title': $orderTitle = $order == 'asc' ? 'desc' : 'asc'; break; case 'user': $orderUser = $order == 'asc' ? 'desc' : 'asc'; break; case 'date': $orderDate = $order == 'asc' ? 'desc' : 'asc'; break; } ?> <div class="wrap">
</div> </div> <hr class="post_line" /><?php } } } else { echo ""; } ?> <div class="row"> <div class="col-xs-12"> <pull class="pull-right"> <?php echo getPagination($replyTotalCount); ?> </pull> </div> </div> <br /> <!--发表回复--> <?php if (is_login()) { $user = query_user(array('avatar', 'uid')); ?> <div class="row"> <div class="col-xs-2"> <p>
echo $category->name; ?> </li> </ol> </div> </div> <div class="row"> <div class="col-lg-12"> <h4><?php echo $category->description; ?> </h4> </div> </div> <?php $count = 0; $current = isset($_GET['url'][1]) && is_numeric($_GET['url'][1]) ? $_GET['url'][1] : 0; echo '<div class="row">'; foreach ($category->getProductsForPage($current, 9) as $product) { $product->echoProduct(); } echo '</div>'; getPagination($current, '/categorie/' . $_GET['url'][0], ceil($category->getProductCount() / 9)); ?> <hr> </div> <?php include 'php/footer.php';
$search = ""; } } if (empty($search)) { $total_records = getRowsContent(); $pages = ceil($total_records / $rows_for_page); if ($total_records == 0) { echo "No hay contenido."; } else { if (isset($_GET['page'])) { $page = (int) $_GET['page']; } else { $page = 0; } $start_with = $page * $rows_for_page; $contenido = getPagination($start_with, $rows_for_page); foreach ($contenido as $content) { $imagen = RAIZ_APP; if (empty($content["caratula"])) { $imagen .= "img/no_photo_available.png"; } else { $imagen .= $content["caratula"]; } echo '<div id="indexstyle">'; echo '<div id="titulo-serie">' . $content["titulo"] . '</div>'; echo '<div id="cartel"><img src="' . $imagen . '" id="caratula"> </div>'; echo '<div id="descripcion-basica">' . substr($content["sinopsis"], 0, 400) . "..." . '</div>'; echo '<div style="clear:both;margin-left: 90%;padding-bottom:2%;"><a href="' . RAIZ_APP . 'includes/descripcion.php?title=' . $content["titulo"] . '">Leer más</a></div>'; echo '</div>'; } echo '<div id="paginacion"><br/>';
function getUserLoveCount() { $request = $_REQUEST; if (empty($request)) { respond(array('success' => false, 'message' => SL_BAD_CALL)); } foreach ($request as $key => $value) { ${$key} = mysql_real_escape_string($value); } $is_long_list = !isset($page) ? true : false; if (isset($start_date) && isset($end_date)) { $from = strtotime(trim($start_date)); $to = strtotime(trim($end_date)); $period = "date(`at`) >= '" . date("Y-m-d", $from) . "' AND date(`at`) <= '" . date("Y-m-d", $to) . "'"; } $total_row = 0; $page_limit = 30; $total_amount = 0; $limit = $is_long_list ? "" : " LIMIT " . ($page - 1) * $page_limit . ",{$page_limit}"; if (!$is_long_list) { $query = "SELECT COUNT(*) as `total`\n\t\t\t\tFROM `" . LOVE . "`\n\t\t\t\tWHERE `company_id` = 1 AND {$period} \n\t\t\t\tGROUP BY `receiver` "; if ($result = mysql_query($query)) { $total_row = mysql_num_rows($result); while ($row = mysql_fetch_assoc($result)) { $total_amount = $total_amount + (int) $row['total']; } $total_amount = number_format($total_amount * $weightage, 2); } if ($total_row == 0) { respond(array('success' => true, 'message' => "No user found", 'rewarderlist' => array())); } } $query = "SELECT `u`.`id` AS `user_id`, `nickname`, `username`,\n SUM( IF( `username`=`giver`, 1, 0 )) AS `sent`,\n SUM( IF( `username`=`receiver`, 1, 0 )) AS `received`\n\t\t\t FROM `" . USERS . "` u\n\t\t\t INNER JOIN `" . LOVE . "` l\n\t\t\t ON (`username` = `receiver` or `username` = `giver`)\n\t\t\t AND `u`.`company_id` = `l`.`company_id` AND {$period}\n\t\t\t WHERE `u`.`company_id` = " . $company_id . " AND u.confirmed = 1\n\t\t\t GROUP BY `username` \n ORDER BY {$sort} {$dir} {$limit}"; if (!($result = mysql_query($query))) { respond(array('success' => false, 'message' => SL_DB_FAILURE)); } else { $return = array(); if (mysql_num_rows($result) > 0) { while ($row = mysql_fetch_assoc($result)) { $return[] = $row; } } if (!empty($return)) { $pagination = ""; if (!$is_long_list) { $total_row = ceil($total_row / $page_limit); $pagination = getPagination($page, $total_row); } respond(array('success' => true, 'userlist' => $return, 'pagination' => $pagination, 'total_amount' => $total_amount)); } else { respond(array('success' => false, 'message' => 'No users', 'sql' => $query)); } } }
// list of user based on review status case 'get_users_by_review': $result = array('user_list' => '', 'pagination' => ''); $per_page = 10; $position = !empty($_REQUEST['position']) ? intval($_REQUEST['position']) : $periods->getCurrentPeriodCount(); $review_status = $_REQUEST['review_status']; $review_type = $_REQUEST['review_type']; $current_page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 1; $period_info = $periods->getPeriodByPosition($position); $count = $review->getUserCountByReview($period_info['id'], $review_status); $user_count = !empty($count) ? $count[0]['count'] : 0; if ($user_count > 0) { $limit = " LIMIT " . ($current_page - 1) * $per_page . ", {$per_page}"; $link_to = $_SERVER['PHP_SELF'] . "?action=get_users_by_review&position={$position}&review_status={$review_status}&review_type={$review_type}&page="; $result['user_list'] = $review->getUserListByReview($period_info['id'], $review_status, $limit, $review_type); $result['pagination'] = getPagination($user_count, $per_page, $current_page, $link_to); } echo json_encode($result); break; // updates wizard step for user_review_id // updates wizard step for user_review_id case 'update_wizard': $user_review_id = intval($_REQUEST['user_review_id']); $wizard_step = intval($_REQUEST['wizard_step']); $review->updateWizardStep($user_review_id, $wizard_step); break; // set the peer review status // set the peer review status case 'peer_review_status': $user_review_id = intval($_REQUEST['user_review_id']); $user_review_peer_status = intval($_REQUEST['user_review_peer_status']);
function getWidget($widget_id, $page_id, $condition) { $wid_settings = getWidgetSettings($widget_id); $widget_title = lookupField('cms_widgets', 'id', 'title', $widget_id); $module_id = lookupField('cms_widgets', 'id', 'module_id', $widget_id); $table_name = lookupField('cms_modules', 'id', 'table_name', $module_id); $temp_html = getTemplate($widget_id, $wid_settings['template_id']); $template_main_html = $temp_html['main_html']; $template_item_html = $temp_html['item_html']; $final_condition = $wid_settings['condition']; if ($final_condition && $condition) { $final_condition = $wid_settings['condition'] . ' AND ' . $condition; } elseif ($condition) { $final_condition = ' WHERE ' . $condition; } $widget_sql = "SELECT * FROM `{$table_name}` " . $final_condition . " " . $wid_settings['limit']; $widget_result = mysql_query($widget_sql); $widget_numrows = mysql_num_rows($widget_result); $widget_total_numrows = mysql_num_rows(mysql_query("SELECT * FROM `{$table_name}` " . $final_condition)); if ($widget_numrows) { $s = 0; while ($s < $widget_numrows) { $sql = "SELECT * FROM cms_widget_fields wid_fields, cms_template_fields temp_fields \n\t\t\tWHERE wid_fields.widget_id='{$widget_id}' and temp_fields.id=wid_fields.template_field_id"; $result = mysql_query($sql); $numrows = mysql_num_rows($result); if ($numrows) { $i = 0; $item_html = $template_item_html; while ($i < $numrows) { $template_field_id = mysql_result($result, $i, 'wid_fields.template_field_id'); $template_field_title = mysql_result($result, $i, 'temp_fields.title'); $temp_feild_settings = getTempFieldSettings($template_field_id); $module_field_id = mysql_result($result, $i, 'wid_fields.module_field_id'); $module_field_title = lookupField('cms_module_fields', 'id', 'title', $module_field_id); $module_field_type = lookupField('cms_module_fields', 'id', 'type', $module_field_id); $item_val = mysql_result($widget_result, $s, $module_field_title); $sub_page_id = mysql_result($widget_result, $s, 'page_id'); $sub_page_title = lookupField('cms_pages', 'id', 'title', $sub_page_id); $sub_page_link = _PREF . $_SESSION['pLang'] . '/page' . $sub_page_id . '/' . $sub_page_title; if ($module_field_type == 'photo') { if ($temp_feild_settings['resize_type'] == 'crop' || $temp_feild_settings['resize_type'] == 'resize') { $thumb = viewPhoto($item_val, $temp_feild_settings['resize_type'], $temp_feild_settings['width'], $temp_feild_settings['height'], 'css', 1, $_SESSION['dots'], 0); } else { $thumb = viewPhoto($item_val, 'full', '', '', 'css', 1, $_SESSION['dots'], 0); } $thumb = str_replace(');', '', str_replace('background-image:url(', '', $thumb)); $item_val = $thumb; } else { if ($temp_feild_settings['limit']) { $item_val = limit($item_val, $temp_feild_settings['limit']); } } $item_html = str_replace("##{$template_field_title}##", $item_val, $item_html); $item_html = str_replace("##sub_link##", $sub_page_link, $item_html); $i++; } $extra_widgets_arr = getContents($item_html, '##wid_start##', '##wid_end##'); foreach ($extra_widgets_arr as $widget_content) { $sub_widget_id = getContents($widget_content, '##wid_id_start##', '##wid_id_end##')[0]; $widget_condition = getContents($widget_content, '##wid_con_start##', '##wid_con_end##')[0]; $con_fields_arr = getContents($widget_condition, '##', '##'); foreach ($con_fields_arr as $field) { $widget_condition = str_replace("##{$field}##", mysql_result($widget_result, $s, $field), $widget_condition); } $extra_widgets = getWidget($sub_widget_id, '', $widget_condition); $item_html = replaceContents($item_html, '##ws' . $sub_widget_id . '##', '##we' . $sub_widget_id . '##', $extra_widgets); $item_html = str_replace('##ws' . $sub_widget_id . '##', '', str_replace('##we' . $sub_widget_id . '##', '', $item_html)); } $widget_items_html .= $item_html; } $s++; } } $extra_widgets_arr = getContents($template_main_html, '##wid_start##', '##wid_end##'); foreach ($extra_widgets_arr as $widget_content) { $widget_id = getContents($widget_content, '##wid_id_start##', '##wid_id_end##')[0]; $widget_condition = getContents($widget_content, '##wid_con_start##', '##wid_con_end##')[0]; $con_fields_arr = getContents($widget_condition, '##', '##'); foreach ($con_fields_arr as $field) { $widget_condition = str_replace("##{$field}##", mysql_result($widget_result, 0, $field), $widget_condition); } $extra_widgets = getWidget($widget_id, '', $widget_condition); $template_main_html = replaceContents($template_main_html, '##ws' . $widget_id . '##', '##we' . $widget_id . '##', $extra_widgets); $template_main_html = str_replace('##ws' . $widget_id . '##', '', str_replace('##we' . $widget_id . '##', '', $template_main_html)); } $link = _PREF . $_SESSION['pLang'] . '/page' . $page_id . '/pn^/' . $widget_title; $main_page_title = lookupField('cms_pages', 'id', 'title', $page_id); $final_html = str_replace("##main_page_title##", $main_page_title, $template_main_html); $final_html = str_replace("##site_pref##", _PREF, $final_html); $final_html = str_replace("##template_items##", $widget_items_html, $final_html); $final_html .= getPagination($wid_settings['pagination_id'], $widget_total_numrows, $wid_settings['limit_num'], $link); if (!$final_html) { $final_html = ''; } return $final_html; }
// Directories are traversable in this example if ($item[File_List::KEY_TYPE] == File_List::TYPE_FOLDER) { print ' <td><a href="' . getOrderLink(false, false) . '&path=' . $path . '/' . urlencode($item[File_List::KEY_NAME]) . '">' . htmlspecialchars($item[File_List::KEY_NAME]) . '</a></td>'; } else { print ' <td>' . htmlspecialchars($item[File_List::KEY_NAME]) . '</td>'; } print ' <td>' . date('jS F, Y, g:i a', $item[File_List::KEY_DATE]) . '</td>'; print ' <td>' . ($item[File_List::KEY_TYPE] == File_List::TYPE_FILE ? niceSize($item[File_List::KEY_SIZE]) : ' ') . '</td>'; print ' <td>' . ($item[File_List::KEY_TYPE] == File_List::TYPE_FILE ? $item[File_List::KEY_EXT] : ' ') . '</td>'; print '</tr>'; } // Show pagination if there are enough items print '<tfoot>'; print ' <tr>'; if ($file_list->getLastItemCount() > $limit || $start != 0) { print ' <td colspan="3">' . getPagination($file_list->getLastItemCount(), $start, $limit) . '</td>'; } else { print ' <td colspan="3"> </td>'; } print ' <td colspan="2" align="right">Showing ' . ($start + 1) . ' to ' . ($start + $limit > $file_list->getLastItemCount() ? $file_list->getLastItemCount() : $start + $limit) . ' of ' . $file_list->getLastItemCount() . ' files </td>'; print ' </tr>'; print '<tfoot>'; } else { // There aren't any files in the folder print '<tr><td colspan="5" align"center" style="text-align:center;padding:10px;">There are no files in the folder</td></tr>'; } ?> </tbody> </table> </div> <!-- End file table -->
$select_name = '等待发货'; } ?> <div style="font-size:3em;padding:2em 0;color: #ccc;text-align: center"> 你还没有<?php echo $select_name; ?> 的交易呦!。O(∩_∩)O~ </div><?php } ?> </div> </div> <div class="pull-right"> <?php echo getPagination($totalPageCount, 16); ?> </div> </div> </div> </div> <script type="text/javascript"> $(function(){ $(window).resize(function(){ $("#main-container").css("min-height", $(window).height() - 343); }).resize(); })
function ListR3($sql, $attr, $link, $conexion = null) { $atributosDefault = array('id' => '', 'class' => 'reporteA', 'checked' => '', 'paginador' => '', 'fieldTotal' => ''); $linkDefault = array('campos' => '', 'args' => '', 'panelId' => '', 'url' => ''); $linksUrl = array('head' => '', 'body' => ''); $atributos = defaultArrayValues($atributosDefault, $attr); $paginador = explode(',', $atributos['paginador']); $paginaStart = is_int((int) get('pagina-start')) && (int) get('pagina-start') > 0 ? get('pagina-start') : 1; $start = ($paginaStart - 1) * $paginador[0]; $limit = ' LIMIT ' . $start . ', ' . $paginador[0]; $sql = filterSql($sql) . $limit; $result = getResult($sql, $conexion); $count = getResult("SELECT FOUND_ROWS() AS total", $conexion); $row = mysql_fetch_object($count); $countTotal = $row->total; $pagitacionHtml = getPagination($paginaStart, $countTotal, $paginador[0], $paginador[1]); if (!empty($link)) { $linkArray = explode('}', $link); if (isset($linkArray[1])) { $linksUrl['body'] = defaultArrayValues($linkDefault, $linkArray[1]); $linksUrl['head'] = defaultArrayValues($linkDefault, $linkArray[0]); } else { $linksUrl['body'] = defaultArrayValues($linkDefault, $linkArray[0]); } } $fieldsName = getFieldsName($result); $fieldsFilter = fieldsFilter($fieldsName, $linksUrl); $tableHeader = getTableHeader($fieldsFilter, $atributos); $tableBody = getTableBody($result, $fieldsFilter, $atributos, $countTotal); $tabla .= "<table id=\"{$atributos['id']}\" class=\"{$atributos['class']}\" style=\"width:100%;clear: both;\">" . "{$tableHeader}{$tableBody}" . "</table>" . "</form>" . "{$pagitacionHtml}"; if ($atributos['checked'] == "checked") { $tabla = "<form method=\"post\" id=\"frm-{$atributos['id']}\">" . $tabla; $tabla .= "</form>"; } return $tabla; }
$current = isset($_GET['url'][0]) && is_numeric($_GET['url'][0]) ? $_GET['url'][0] : 0; $amount_on_page = isset($_GET['url'][1]) && is_numeric($_GET['url'][1]) ? $_GET['url'][1] : 9; $DISPLAY_ITEMS = getEmptyData($current, $amount_on_page); } else { $search_string = $_GET['url'][0]; $result = getSearchResult($search_string); $total_result_length = count($result); $current = isset($_GET['url'][1]) && is_numeric($_GET['url'][1]) ? $_GET['url'][1] : 0; $amount_on_page = isset($_GET['url'][2]) && is_numeric($_GET['url'][2]) ? $_GET['url'][2] : 9; $DISPLAY_ITEMS = array_slice($result, $current * $amount_on_page, $amount_on_page); if ($total_result_length == 0) { echo '<h2>Geen resultaten voor de zoekopdracht: ' . $search_string . '</h2>'; } elseif ($total_result_length == 1) { echo '<h2>' . $total_result_length . ' resultaat voor de zoekopdracht: ' . $search_string . '</h2>'; } else { echo '<h2>' . $total_result_length . ' resultaten voor de zoekopdracht: ' . $search_string . '</h2>'; } } echo '<div class="row">'; foreach ($DISPLAY_ITEMS as $item) { $item->echoProduct(); } echo '</div>'; $page_count = ceil($total_result_length / $amount_on_page); if ($is_empty_search_string) { getPagination($current, '/zoeken', $page_count, $amount_on_page); } else { getPagination($current, '/zoeken/' . $_GET['url'][0], $page_count, $amount_on_page); } echo '</div>'; get_footer();
$limitAmount = $deviceLines; } else { $limitLeft = $_REQUEST['limit'] - $limitStart; $limitAmount = $limitLeft > $deviceLines ? $deviceLines : $limitLeft; } $eventsSql .= " limit {$limitStart}, {$limitAmount}"; } elseif (!empty($_REQUEST['limit'])) { $eventsSql .= " limit 0, " . $_REQUEST['limit']; } $nEvents = dbFetchOne($countSql, 'EventCount'); if (!empty($limit) && $nEvents > $_REQUEST['limit']) { $nEvents = $_REQUEST['limit']; } $pages = (int) ceil($nEvents / $deviceLines); $maxShortcuts = 3; $pagination = getPagination($pages, $_REQUEST['page'], $maxShortcuts, $filterQuery . $sortQuery . '&limit=' . $_REQUEST['limit'], '&'); xhtmlHeaders(__FILE__, $SLANG['Events']); ?> <body> <div id="page"> <div id="header"> <div id="headerButtons"><?php echo makeLink("?view=filter", empty($_REQUEST['filterName']) ? $SLANG['ChooseFilter'] : $_REQUEST['filterName'], canView('Events')); ?> </div> <h2><?php echo sprintf($CLANG['EventCount'], $nEvents, zmVlang($VLANG['Event'], $nEvents)); ?> </h2> </div> <div id="content">
$eventWidth = reScale($event['Width'], $scale); $eventHeight = reScale($event['Height'], $scale); if ($maxWidth < $eventWidth) { $maxWidth = $eventWidth; } if ($maxHeight < $eventHeight) { $maxHeight = $eventHeight; } if ($event['Archived']) { $archived = true; } else { $unarchived = true; } } $maxShortcuts = 5; $pagination = getPagination($pages, $page, $maxShortcuts, $filterQuery . $sortQuery . '&limit=' . $limit); $focusWindow = true; xhtmlHeaders(__FILE__, translate('Events')); ?> <body> <div id="page"> <div id="header"> <div id="headerButtons"> <?php if ($pages > 1) { if (!empty($page)) { ?> <a href="?view=<?php echo $view; ?> &page=0<?php
style="display:none"<?php } ?> > <p id="load_more_text"><img style="margin-top:80px" src="/open/Application/Weibo/Static/images/loading-new.gif"/></p> </div> <div id="index_weibo_page" style=" <?php if ($page == 1) { ?> display:none<?php } ?> "> <div class="text-right"> <?php echo getPagination($total_count, 30); ?> </div> </div> </div> <!--微博内容列表部分结束--> <!--首页右侧部分--> <div class="weibo_right" style="width: 280px"> <!--登录后显示个人区域--> <?php if (is_login()) { ?> <div class="user-card" style="height: auto;"> <div> <div class="top_self">