当前位置: 首页>>代码示例>>PHP>>正文


PHP get_total函数代码示例

本文整理汇总了PHP中get_total函数的典型用法代码示例。如果您正苦于以下问题:PHP get_total函数的具体用法?PHP get_total怎么用?PHP get_total使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_total函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_test_one

/**
 * 获取一道测试题目和题目选项
 *
 * @param integer $offset;
 * return array;
 */
function get_test_one($offset)
{
    $tc_id = get_tcid($offset);
    $count = get_count($tc_id);
    $num = get_total($tc_id);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}test_question WHERE `tc_id`='{$tc_id}' \n\t\tLIMIT {$num},1";
    echo $sql, '<br>';
    $question = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql, true);
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}test_question_option WHERE `qid`='{$question['qid']}'";
    //echo $sql,'<br>';
    $option = $GLOBALS['_MooClass']['MooMySQL']->getAll($sql);
    $temp = array();
    $temp['tc_id'] = $tc_id;
    $temp['count'] = $count;
    $temp['num'] = $num;
    $temp['question'] = $question;
    $temp['option'] = $option;
    return $temp;
}
开发者ID:noikiy,项目名称:zays,代码行数:25,代码来源:function.php

示例2: get_total

    }
    // end of if for Postgraduate
    ?>
                          <?php 
    /*End of Post-Graduate Summary*/
    echo '<div class="span5">';
    if ($total_applicant > 0) {
        echo '<h4 align="center">Admission Status <span class="badge badge-success">' . $total_applicant . '</span></h4>';
    } else {
        echo '<h4 align="center">Admission Status <span class="badge badge-Important">' . $total_applicant . '</span></h4>';
    }
    $Pending_applicants = get_total(1);
    $ineligible_applicants = get_total(2);
    $Eligible_applicants = get_total(3);
    $rejected_applicants = get_total(4);
    $accepted_applicants = get_total(5);
    ?>
						   <table class="table table-bordered table-hover">
						   <thead>
								<tr>
									<th>Status</th>
									<th width="10%">Total</th>
								</tr>
							</thead>
							<tbody>
                            	<tr>
									<td>Pending</td>
									<td width="10%"><?php 
    if (isset($Pending_applicants)) {
        echo $Pending_applicants;
    }
开发者ID:Ghaji,项目名称:form_application,代码行数:31,代码来源:view_summary.php

示例3: intval

//title website ================================================================
$title = CONTACT_TITLE_INDEX;
//paging =======================================================================
if (isset($_GET['page'])) {
    $page = intval($_GET['page']);
} else {
    $page = 1;
}
$page = $page > 0 ? $page : 1;
$limit = 10;
$offset = ($page - 1) * $limit;
$options = array('limit' => $limit, 'offset' => $offset, 'order_by' => 'id ASC');
//data of paging ===============================================================
//Search data ==================================================================
$url = 'admin.php?controller=contact';
if (isset($_POST['search'])) {
    header('location:admin.php?controller=contact&search=' . $_POST['search']);
}
if (isset($_GET['search'])) {
    $search = escape($_GET['search']);
    $options['where'] = "LOWER(contact.NAME) LIKE LOWER('%{$search}%') ";
    $url = 'admin.php?controller=contact&search=' . $_GET['search'];
}
$total_rows = get_total('contact', $options);
$total = ceil($total_rows / $limit);
$pagination = pagination($url, $page, $total);
//data show ====================================================================
$status = array(0 => CONTACT_STATUS_WAIT, 1 => CONTACT_STATUS_RESPONE);
$contacts = get_all('contact', $options);
//load view ====================================================================
require 'backend/views/contact/index.php';
开发者ID:ngogiangthanh,项目名称:avalon-web,代码行数:31,代码来源:index.php

示例4: get_counts

function get_counts(&$hash)
{
    $counts['unique'] = get_unique($hash);
    $counts['total'] = get_total($hash);
    $counts['hapax'] = get_hapax($hash);
    return $counts;
}
开发者ID:raffled,项目名称:Lexomics,代码行数:7,代码来源:cutter.php

示例5: add_cart_to_session

function add_cart_to_session($cart_item)
{
    $order_details = array();
    $order = get_order_array();
    $cart = get_cart_array();
    $temp = (array) $_SESSION[session_id()];
    if (!(is_array($temp) && ($temp['order'] && $temp['order_details']))) {
        $order_details[] = $cart_item;
    } else {
        $order_details = $temp['order_details'];
        $order_details[] = $cart_item;
        $order = $temp['order'];
    }
    $order['total'] = get_total($order_details);
    $cart['order'] = $order;
    $cart['order_details'] = $order_details;
    $_SESSION[session_id()] = $cart;
    if ($_SESSION[session_id()]) {
        return true;
    } else {
        return false;
    }
}
开发者ID:binhdarkcu,项目名称:shoping_quan,代码行数:23,代码来源:cart.php

示例6: lxguard_main

function lxguard_main($clearflag = false)
{
    include_once "htmllib/lib/lxguardincludelib.php";
    lxfile_mkdir("__path_home_root/lxguard");
    $lxgpath = "__path_home_root/lxguard";
    $file = "/var/log/secure";
    $fp = fopen($file, "r");
    $fsize = filesize($file);
    $newtime = time();
    $oldtime = time() - 60 * 10;
    $rmt = lfile_get_unserialize("{$lxgpath}/hitlist.info");
    if ($rmt) {
        $oldtime = max((int) $oldtime, (int) $rmt->ddate);
    }
    $ret = FindRightPosition($fp, $fsize, $oldtime, $newtime, "getTimeFromSysLogString");
    $list = lfile_get_unserialize("{$lxgpath}/access.info");
    if ($ret) {
        parse_sshd_and_ftpd($fp, $list);
        lfile_put_serialize("{$lxgpath}/access.info", $list);
    }
    get_total($list, $total);
    //dprintr($list['192.168.1.11']);
    dprintr($total);
    $deny = get_deny_list($total);
    $hdn = lfile_get_unserialize("{$lxgpath}/hostdeny.info");
    $deny = lx_array_merge(array($deny, $hdn));
    $string = null;
    foreach ($deny as $k => $v) {
        if (csb($k, "127")) {
            continue;
        }
        $string .= "ALL : {$k}\n";
    }
    dprint($string);
    $stlist[] = "###Start Program Hostdeny config Area";
    $stlist[] = "###Start Lxdmin Area";
    $stlist[] = "###Start Kloxo Area";
    $stlist[] = "###Start Lxadmin Area";
    $endlist[] = "###End Program HostDeny config Area";
    $endlist[] = "###End Kloxo Area";
    $endlist[] = "###End Lxadmin Area";
    $startstring = $stlist[0];
    $endstring = $endlist[0];
    file_put_between_comments($stlist, $endlist, $startstring, $endstring, "/etc/hosts.deny", $string);
    if ($clearflag) {
        lxfile_rm("{$lxgpath}/access.info");
        $rmt = new Remote();
        $rmt->hl = $total;
        $rmt->ddate = time();
        lfile_put_serialize("{$lxgpath}/hitlist.info", $rmt);
    }
    return $list;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:53,代码来源:lib.php

示例7: array

			<td><b>Descripcion</b></td>
			<td align='center'><b>Total de Incidencias</b></td>
			<td align='center'><b>Pendientes</b></td>
			<td><b>Acciones</b></td>
			</thead>	
		
		</tr>
		
<?php	foreach ($get_incidencias as $incidencia): ?>
		<tr>
				<?php 
					$atributo_boton_modificar = array('class' => 'btn btn-cm-linkedin btn-xs glyphicon glyphicon-pencil');
					$atributo_boton_eliminar = array('class' => 'btn btn-danger glyphicon glyphicon-remove', 'onclick' => "javascript:return confirm('Seguro que desea eliminar este dato?')");				
				 ?>
				<td><?php echo $incidencia->adscripcion;?></td>
				<td><?php echo $incidencia->descripcion;?></td>
				
				<td align='center'><span class="badge badge-cm-linkedin"><?php echo get_total($incidencia->qna_id,$incidencia->adscripcion_id);?></span></td>
				<td align='center'><span class="badge badge-cm-linkedin"><?php echo get_total_pendientes($incidencia->qna_id,$incidencia->adscripcion_id);?></span></td>
				<td>
					<?php echo anchor('admin/capturar_all_centro/'.$incidencia->qna_id.'/'.$incidencia->adscripcion_id,' ',$atributo_boton_modificar);?> 
					
				</td>
			

			</tr>
	<?php 	endforeach;?>

</table>	
<?php echo anchor('admin/capturar', '<i class="fa fa-chevron-circle-left fa-2x"></i>'); ?>
开发者ID:rikardote,项目名称:rechum,代码行数:30,代码来源:por_centro.php

示例8: isset

    $total = $row['count'];
    return $total;
}
if (isset($_POST['submit'])) {
    $keywords = $_POST['keywords'];
}
if (isset($_GET['keywords'])) {
    $keywords = $_GET['keywords'];
}
$user_id = $_SESSION[id];
// Calculate pagination information
$cur_page = isset($_GET['page']) ? $_GET['page'] : 1;
$results_per_page = 10;
// number of results per page
$skip = ($cur_page - 1) * $results_per_page;
$total = get_total($keywords, $user_id, $dbc);
$num_pages = ceil($total / $results_per_page);
if (isset($_GET['deleted_file'])) {
    $deleted_file = get_title_by_id($dbc, $_GET['deleted_file']);
    delete_resource($dbc, $db_name, $_GET['deleted_file']);
    //echo '<div class="alert alert-success"><button type="button" class="close" data-dismiss="alert">&times;</button>';
    //echo '文献"' . $deleted_file . '"已被删除!</div>';
    render_success('文献"' . $deleted_file . '"已被删除!');
}
?>
<p></p>
<div class="container">
    <?php 
include_once 'resource_header.php';
?>
    <table class="table table-hover">
开发者ID:sdgdsffdsfff,项目名称:docs-1,代码行数:31,代码来源:resource_manager.php

示例9: write_csv

 private function write_csv(&$hash, $end, $style = null)
 {
     $DELIM = "\t";
     //$file = $this->folder . "/$style/csv/" . $this->id . "_$end.csv";
     $file = $this->folder . "/tsv/" . $this->id . "_{$end}.tsv";
     $total = get_total($hash);
     $unique = get_unique($hash);
     $hapax = get_hapax($hash);
     hash_sort($hash, 'c');
     $csvarr = array();
     // start the csv
     $csvarr[] = array($this->id . "_{$end}.txt", $total, $unique, $hapax);
     $csvarr[] = array("RANK", "WORD", "COUNT", "RELATIVE FREQUENCY");
     $rank = 0;
     $allrank = 1;
     $prevcount = null;
     // iterate through the list of word printing them out
     foreach ($hash as $word => $count) {
         $prop = round($count / $total, 10);
         if ($count != $prevcount) {
             $rank = $allrank;
         }
         $prevcount = $count;
         $allrank++;
         // update csv
         $csvarr[] = array($rank, utf8_decode($word), $count, $prop);
     }
     // write out file
     $FH = fopen($file, 'w');
     if (!$FH) {
         return "Could not open file '{$file}' in mode 'c+'.";
     }
     foreach ($csvarr as $line) {
         if (!fputcsv($FH, $line, "{$DELIM}")) {
             return "Could not write " . implode(",", $line) . " to file '{$file}'.";
         }
     }
     fclose($FH);
     return null;
 }
开发者ID:raffled,项目名称:Lexomics,代码行数:40,代码来源:chunkset.php

示例10: foreach

}
if (isset($_POST['pid'])) {
    foreach ($_POST['pid'] as $pid) {
        $pid = intval($pid);
        products_delete($pid);
    }
}
if (isset($_GET['page'])) {
    $page = intval($_GET['page']);
} else {
    $page = 1;
}
$page = $page > 0 ? $page : 1;
$limit = 10;
$offset = ($page - 1) * $limit;
$options = array('limit' => $limit, 'offset' => $offset, 'order_by' => 'id DESC');
$url = 'admin.php?controller=product';
if (isset($_GET['search'])) {
    $search = escape($_GET['search']);
    $options['where'] = "name LIKE '%{$search}%'";
    $url = 'admin.php?controller=product&search=' . $_GET['search'];
}
$total_rows = get_total('products', $options);
$total = ceil($total_rows / $limit);
//data
$title = 'Sản phẩm';
$user = $_SESSION['user'];
$products = get_all('products', $options);
$pagination = pagination($url, $page, $total);
//load view
require 'backend/views/product/index.php';
开发者ID:sangtdpd00871,项目名称:sangtdpd00871,代码行数:31,代码来源:index.php

示例11: gateway_check

function gateway_check()
{
    //pokazh($_SESSION,"session");
    $label_line = "";
    $label_line2 = "";
    $label_line3 = "";
    $my_img = "./img/check-2.png";
    $my_img = @imagecreatefrompng($my_img);
    $text_colour = imagecolorallocate($my_img, 0, 0, 0);
    $line_colour = imagecolorallocate($my_img, 128, 255, 0);
    $font = imageloadfont('./fonts/ArialUnicode.gdf');
    $arrContent = get_content();
    $arrSize = count($arrContent);
    $arr1 = array_slice($arrContent, 0, 3);
    $label_line = implode(",", $arr1);
    if ($arrSize > 3) {
        $label_line2 = implode(",", array_slice($arrContent, 3, 4));
    }
    if ($arrSize > 7) {
        $label_line3 = implode(",", array_slice($arrContent, 7, 4));
    }
    $label_line = iconv("UTF-8", "windows-1251", $label_line);
    $label_line2 = iconv("UTF-8", "windows-1251", $label_line2);
    $label_line3 = iconv("UTF-8", "windows-1251", $label_line3);
    imagestring($my_img, $font, 338, 186, $label_line, $text_colour);
    //  pay for images 1
    imagestring($my_img, $font, 338, 473, $label_line, $text_colour);
    //  pay for images 2
    imagestring($my_img, $font, 215, 214, $label_line2, $text_colour);
    //  pay for images 1a
    imagestring($my_img, $font, 210, 503, $label_line2, $text_colour);
    //  pay for images 2a
    imagestring($my_img, $font, 215, 241, $label_line3, $text_colour);
    //  pay for images 1b
    imagestring($my_img, $font, 210, 530, $label_line3, $text_colour);
    //  pay for images 2b
    $label_line = get_total();
    // "9024 руб.00 коп.";
    $label_line = iconv("UTF-8", "windows-1251", $label_line);
    imagestring($my_img, $font, 258, 270, $label_line, $text_colour);
    //  Total 1
    imagestring($my_img, $font, 258, 560, $label_line, $text_colour);
    //  Total 2
    header("Content-type: image/png");
    imagepng($my_img);
    //imagecolordeallocate( $line_color );
    //imagecolordeallocate( $text_color );
    imagedestroy($my_img);
}
开发者ID:laiello,项目名称:cartonbank,代码行数:49,代码来源:check.php

示例12: header

//load model
require_once 'backend/models/products.php';
//title website ================================================================
$title = BRANCH_TITLE_INDEX;
//============
if (isset($_POST['search'])) {
    header('location:admin.php?controller=wheretobuy&search=' . $_POST['search']);
}
if (isset($_GET['page'])) {
    $page = intval($_GET['page']);
} else {
    $page = 1;
}
$page = $page > 0 ? $page : 1;
$limit = 10;
$offset = ($page - 1) * $limit;
$options = array('limit' => $limit, 'offset' => $offset);
$url = 'admin.php?controller=wheretobuy';
if (isset($_GET['search'])) {
    $search = escape($_GET['search']);
    $options['where'] = "LOWER(branches.NAME_BRANCH) LIKE LOWER('%{$search}%') ";
    $url = 'admin.php?controller=wheretobuy&search=' . $_GET['search'];
}
$total_rows = get_total('branches', $options);
$total = ceil($total_rows / $limit);
//data
$branches = get_all('branches', $options);
$pagination = pagination($url, $page, $total);
//load view ====================================================================
require 'backend/views/wheretobuy/index.php';
开发者ID:ngogiangthanh,项目名称:avalon-web,代码行数:30,代码来源:index.php

示例13: get_total

echo "<input type='hidden' name='kw' value='{$key_word}' size='0' >";
?>
                                        <input type='submit' value='生成GIF' class="btn btn-info btn-xs">
                                    </form>
                                </td>
                                <td>
                                    <a href='help.html' target='_blank'>使用说明</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td >
                        <?php 
$total = get_total($key_word);
echo "<table class='main_frame_width'><tr><td>";
show_list($key_word, $pn, $total, 12, $page_size);
echo "</td><td >&nbsp</td><td class='text-right'>";
echo "Total:{$total}";
echo "</td></tr></table>";
?>
                    </td>
                </tr>
                <tr><td> <?php 
show_search_result($key_word, $total, $pn * $page_size, $page_size);
?>
 </td></tr>
                <tr >
                    <td align="right">
                        <table >                            
开发者ID:jjling2011,项目名称:sams,代码行数:31,代码来源:index.php

示例14: array

        $value = $row[value];
        if (array_key_exists($id, $recommended)) {
            $recommended[$id][] = array($property, $value);
        } else {
            $recommended[$id] = array(array($property, $value));
        }
    }
}
if (count($recommended) > 5) {
    $recommended = array_slice($recommended, 0, 5, true);
}
$cur_page = isset($_GET['page']) ? $_GET['page'] : 1;
$results_per_page = 10;
// number of results per page
$skip = ($cur_page - 1) * $results_per_page;
$total = get_total($keywords, array_keys($recommended), $dbc);
$num_pages = ceil($total / $results_per_page);
?>
<div class="container">

    <form class="form-search" action="search.php" method="get" class="form-horizontal"
          enctype="multipart/form-data">

        <div class="container" >
            <?php 
include_once "./search_form.php";
?>

            <div class="row">
                <div class="container">
                    <?php 
开发者ID:sdgdsffdsfff,项目名称:docs-1,代码行数:31,代码来源:search.php

示例15: mysqli_fetch_array

    $row = mysqli_fetch_array($result);
    $total = $row['count'];
    return $total;
}
if (isset($_POST['submit'])) {
    $keywords = $_POST['keywords'];
}
if (isset($_GET['keywords'])) {
    $keywords = $_GET['keywords'];
}
// Calculate pagination information
$cur_page = isset($_GET['page']) ? $_GET['page'] : 1;
$results_per_page = 10;
// number of results per page
$skip = ($cur_page - 1) * $results_per_page;
$total = get_total($keywords, $dbc);
$num_pages = ceil($total / $results_per_page);
$url = $_SERVER['PHP_SELF'] . '?keywords=' . $keywords . '&db_name=' . $db_name;
?>
<div class="container">
    <?php 
include_once 'entity_search_form.php';
echo '<hr>';
if ($db_name == "tcmls" && (!isset($keywords) || $keywords == '')) {
    include_once $db_name . '_recommended_entities.php';
} else {
    ?>
        <div class="row">
            <div class="col-md-10">

开发者ID:sdgdsffdsfff,项目名称:docs-1,代码行数:29,代码来源:entity_search.php


注:本文中的get_total函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。