本文整理汇总了PHP中dbSel函数的典型用法代码示例。如果您正苦于以下问题:PHP dbSel函数的具体用法?PHP dbSel怎么用?PHP dbSel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dbSel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dbFetch
function dbFetch($s,$t,$f=""){
$t=dbSel($s,$t,$f." LIMIT 0,1");
if(dbNRow($t)==1){
$r=dbFA($t);
return $r[$s];
}else{
return '';
}
}
示例2: MstrGetNextUrut
function MstrGetNextUrut($t, $a, $o = "")
{
$ts = dbSel("dcid,urut", $t, "O/ urut " . $o);
$lid = array(-1, 0, 0);
while ($rs = dbFA($ts)) {
if ($rs['dcid'] == $a) {
$lid[2] = $rs['urut'];
return $lid;
}
$lid[0] = $rs['dcid'];
$lid[1] = $rs['urut'];
}
return $lid;
}
示例3: rapor_pelajaran_nilai
function rapor_pelajaran_nilai($pel,$kls,$siswa){
$nilai=0; $bobot=0;
$t1=dbSel("*","aka_penilaian","W/pelajaran='$pel' AND kelas='$kls'");
while($r1=dbFA($t1)){
$t2=dbSel("nilai","aka_daftarnilai","W/siswa='$siswa' AND penilaian='".$r1['replid']."'");
//echo $_SESSION['libdb_dbQsql'];
while($r2=dbFA($t2)){
$nilai+=$r2['nilai']*$r1['bobot'];
}
$bobot+=$r1['bobot'];
}
if($bobot>0){
$nilai=$nilai/$bobot;
} else {
$nilai=0;
}
return $nilai;
}
示例4: tdLabel
$cview = "employee";
// current view
$ct_bg = "folderico.png";
$ct_title = "Edit Profile";
function tdLabel($a, $s = "", $w = "150px", $cs = 0)
{
$s = $s == "L" ? "text-align:left" : $s;
return "<td width=\"" . $w . "\"" . ($cs == 0 ? "" : " colspan=\"" . $cs . "\"") . " align=\"right\" style=\"padding-right:6px;" . $s . "\">{$a}:</td>";
}
// Global Variables
$mstr_marital = MstrGet("mstr_marital");
$mstr_religion = MstrGet("mstr_religion");
$mstr_family = MstrGet("mstr_family");
// Preprocessing Variables
$dcid = gets('nid');
$t = dbSel("*", "employee", "W/ dcid='{$dcid}'");
$empp = dbFAx($t);
?>
<html><head>
<?php
require_once VWDIR . 'style.php';
require_once SYDIR . 'preferences.php';
?>
<style type="text/css">.preftbl{border-radius:2px;padding:1px;border-collapse:collapse}.preftbl tr{border:1px solid #d0d0d0; height:16px;background:#ffffff}.preftbl td{font:11px 'Segoe UI', Tahoma, sans-serif;color:#303942}.preftbl tr:hover{background:#e4ecf7}.prefdel{border:none;width:15px;height:15px;background:url('<?php
echo IMGR;
?>
pfr_del0.png')center no-repeat;cursor:pointer}.prefdel:hover{background:url('<?php
echo IMGR;
?>
pfr_del1.png')center no-repeat}.prefopt{visibility:hidden;width:100px}.preftbl tr:hover .prefopt{visibility:visible}</style>
示例5: ftgl
to <?php
echo ftgl($rpf['date2']);
?>
</td>
<td width="90px"><?php
echo $rpf['speaker'];
?>
</td>
<td width="100px"><?php
echo $rpf['participant'];
?>
</td>
<td width="60px" align="center"><table style="border:none;background:none" cellspacing="0" cellpadding="0"><tr>
<?php
if ($rpf['file'] != 0) {
$tfile = dbSel("file", "emp_files", "W/dcid='" . $rpf['file'] . "'");
if (mysql_num_rows($tfile) > 0) {
$rfile = mysql_fetch_array($tfile);
?>
<td style="border:none;background:none">
<a class="filebtn" href="<?php
echo FLNK . $rfile['file'];
?>
" target="_blank" title="Open attachment file">
<div style="background:url('<?php
echo IMGR;
?>
bi_file.png') no-repeat;width:24px;height:24px"></div>
</a></td>
<?php
} else {
示例6: array
<?php
$mstr_author = array();
$t = dbSel("*", "mstr_author", "O/ prefix LIMIT 0,20");
while ($r = dbFA($t)) {
$mstr_author[$r['dcid']] = $r['name'] . " (" . $r['prefix'] . ")";
}
$mstr_publisher = array();
$t = dbSel("*", "mstr_publisher", "O/ name LIMIT 0,20");
while ($r = dbFA($t)) {
$mstr_publisher[$r['dcid']] = $r['name'];
}
$mstr_class = MstrGetx("mstr_class", "code");
$mstr_language = MstrGet("mstr_language");
$txtWidth = "width:344px";
?>
<script type="text/javascript" language="javascript">
function getBarcode(a){
var b=a.split("/");
E('barcode').value=b[0];
}
function getCallNumber(){
var classcode=E('class').value;
var author=getSelectedText('author');
var sa=author.indexOf("(")+1;
var sb=author.indexOf(")",sa);
auth=author.substring(sa,sb);
var title=E('title').value.substr(0,1);
title=title.toUpperCase();
var callnum=classcode+" "+auth+" "+title;
E('tcallnumber').value=callnum;
示例7: array
// Master Publisher
$mstr_publisher = array();
$fm = gets('act') == 'edit' ? " WHERE dcid='" . $r['publisher'] . "'" : "";
$t = dbSel("*", "mstr_publisher", $fm . "O/ name LIMIT 0,1");
while ($f = dbFA($t)) {
$mstr_publisher[$f['dcid']] = $f['name'];
}
// Master Class
$mstr_class = array();
$t = dbSel("*", "mstr_class", "O/ code");
while ($f = dbFA($t)) {
$mstr_class[$f['dcid']] = "(" . $f['code'] . ") " . $f['name'];
}
// Master Language
$mstr_language = array();
$t = dbSel("*", "mstr_language", "O/ code");
while ($f = dbFA($t)) {
$mstr_language[$f['dcid']] = $f['name'];
}
$txtWidth = "width:344px";
?>
<div class="hl1">New catalog:</div>
<table cellspacing="0" cellpadding="0" border="0"><tr valign="top"><td>
<div class="hl2" style="margin-top:10px;margin-bottom:10px">Bibliographic Informations</div>
<table class="stable" cellspacing="0" cellpadding="4px" border="0">
<tr><td width="100px" align="left">Title:</td><td width="370px"><?php
echo iText('title', $r['title'], $txtWidth, '', 'onkeyup="sendTitle();vTitle(1);checkBookTitle()"');
?>
</td></tr>
<tr id="retitle" style="display:none"><td></td><td><div id="etitle" class="espan">You can't leave this empty.</div></td></tr>
<tr><td align="left">Author:</td><td>
示例8: session_start
<?php
if (session_id() == "") {
session_start();
}
header('Content-type: image/jpeg');
require_once 'system/config.php';
require_once SYSDIR . 'db.php';
require_once LIBDIR . 'common.php';
$dcid = getsx('id');
$t = dbSel("photo", "emp_photo", "W/empid='{$dcid}'");
if (mysql_num_rows($t) > 0) {
$r = dbFA($t);
echo base64_decode($r['photo']);
} else {
echo "Error!";
}
示例9: dbSel
} else {
?>
<tr id="reb_reference<?php
echo $b;
?>
" style="display:none"></tr>
<?php
}
}
?>
</table><input type="hidden" id="ceb_reference" value="0"/>
<div id="aeb_reference" style="margin:9px 0 15px 0"><a class="linkl11" href="javascript:addEntry('reference',0)">Add reference...</a></div>
</td></tr>
</table>
<?php
$tia = dbSel("*", "emp_ainfo", "W/empid='{$dcid}'");
$empai = dbFAx($tia);
?>
<table class="stable" cellspacing="0" cellpadding="2px" width="875px">
<tr><td> </td><td colspan="2"></td></tr> <!-- Separator -->
<tr height="30px" valign="top"><td width="20px"><b>I.</b></td><td colspan="2"><strong>Additional Information</strong></td></tr><?php
$rwidth = "width:838px";
$ailbl = array('', 'Are you born again Christian? (If yes mention the approximate date):', 'Please give us the details of your rebirth and its effects upon your life:', 'Write your statement of faith:', 'Write your concepts and opinions regarding the Holy Trinity:', 'What is your philosophy regarding Christian Education:');
for ($i = 1; $i < count($ailbl); $i++) {
?>
<tr><td> </td><td colspan="2"><?php
echo $ailbl[$i];
?>
</td></tr>
<tr><td> </td><td colspan="2"><?php
echo iText('ainfo' . $i, $empai['info' . $i], $rwidth);
示例10: dbSel
<?php
require_once SYDIR . 'ptrack.php';
$txtWidth = "width:344px";
$t = dbSel("*", "so_history", "W/status='3' ORDER BY dcid DESC LIMIT 0,1");
if (mysql_num_rows($t) > 0) {
$r = mysql_fetch_array($t);
$btot = mysql_num_rows(mysql_query("SELECT * FROM `book`"));
$bdue = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "`"));
//$bcek=mysql_num_rows(mysql_query("SELECT * FROM `".$r['ntable']."cek`"));
$bcekY = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "cek`"));
$bcekN = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N'"));
$bcekNY = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N' AND note!=''"));
$bcekNN = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N' AND note=''"));
$bcek = $bcekY + $bcekN;
$bcekYp = round($bcekY * 100 / $bcek, 2);
$bcekNp = round($bcekN * 100 / $bcek, 2);
$buli = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "new`"));
?>
<script type="text/javascript" language="javascript">
function doneChecking(){
//if(confirm('Are you sure book cheking is done and proceed to next step?')){
E('donecekform').submit();
//}
}
</script>
<div style="padding:10px 0 10px 0">
<table id="prog_track" cellspacing="5px" cellpadding="0"><tr>
<td>
<div class="ptrackbox">
<table cellspacing="0" cellpadding="0"><tr>
示例11: explode
if ($y != -1) {
$w[$y] = $x - $cw;
}
for ($i = 0; $i < count($h); $i++) {
$pdf->MultiCell($w[$i], 0, $h[$i], 1, $al[$i], 1, 0, '', '', true);
}
$pdf->Ln();
$pdf->SetTextColor(0);
}
/* Pre Data Processing */
if (gets('ids') != ALL) {
$ids = explode("-", gets('ids'));
} else {
$ids = array();
$ids[0] = 0;
$t = dbSel("dcid", "catalog", "O/ title");
$i = 1;
while ($r = dbFA($t)) {
$ids[$i++] = $r['dcid'];
}
}
define('dp_Title', 1);
define('dp_Callnumber', 2);
define('dp_Idnumber', 3);
define('dp_Author', 4);
define('dp_Publisher', 5);
define('dp_Classification', 6);
define('dp_Isbn', 7);
define('dp_Releasedate', 8);
define('dp_Available', 9);
$dps = explode("-", gets('dps'));
示例12: dbSel
<?php
$t = dbSel("*", "mstr_document", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
?>
<tr><td width="380px"><?php
echo $r['name'];
?>
</td><td align="right">
<div class="prefopt">
<?php
if ($k != 1) {
?>
<input type="button" title="Move up" class="prefup" onclick="m_document('up',<?php
echo $r['dcid'];
?>
)"/> <?php
}
?>
<?php
if ($k != $n) {
?>
<input type="button" title="Move down" class="prefdn" onclick="m_document('dn',<?php
echo $r['dcid'];
?>
)"/><?php
} else {
?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php
示例13: mysql_query
$t = mysql_query("SELECT aka_siswa.replid,aka_siswa.nama,aka_siswa.nis FROM aka_siswa_kelas LEFT JOIN aka_siswa ON aka_siswa.replid=aka_siswa_kelas.siswa WHERE aka_siswa.nama LIKE '%{$keyw}%' GROUP BY aka_siswa_kelas.siswa");
//dbSel("replid,nama","aka_siswa","W/nama LIKE '%$keyw%'");
$n = mysql_num_rows($t);
if ($n > 0) {
//log_print('peminjaman_member_cari: get siswa by nama '.$n);
if ($n == 1) {
$r = mysql_fetch_array($t);
//log_print('peminjaman_member_cari: get siswa by nama='.$r['replid']);
$mid = $r['replid'];
$mnama = $r['nama'];
}
$mtipe = 1;
}
//log_print('after siswa nama mid='.$mid);
if ($mid == 0 && $mtipe == 0) {
$t = dbSel("replid,nama", "hrd_pegawai", "W/nama LIKE '%{$keyw}%'");
$n = mysql_num_rows($t);
if ($n > 0) {
//log_print('peminjaman_member_cari: get pegawai by nama '.$n);
if ($n == 1) {
$r = mysql_fetch_array($t);
//log_print('peminjaman_member_cari: get pegawai by nama='.$r['replid']);
$mid = $r['replid'];
$mnama = $r['nama'];
}
$mtipe = 2;
}
}
//log_print('after pegawai nama mid='.$mid);
}
echo $mid == 0 ? $mtipe : $mid . "-" . $mtipe . "-" . $mnama;
示例14: dbSel
<?php
$t = dbSel("*", "mstr_language", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
?>
<tr><td width="380px"><?php
echo $r['name'];
?>
(<?php
echo $r['code'];
?>
)</td><td align="right">
<div class="prefopt">
<?php
if ($k != 1) {
?>
<input type="button" title="Move up" class="prefup" onclick="b_language('up',<?php
echo $r['dcid'];
?>
)"/> <?php
}
?>
<?php
if ($k != $n) {
?>
<input type="button" title="Move down" class="prefdn" onclick="b_language('dn',<?php
echo $r['dcid'];
?>
)"/><?php
示例15: dbSel
<?php
$t = dbSel("*", "mstr_traintype", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
?>
<tr><td width="380px"><?php
echo $r['name'];
?>
</td><td align="right">
<div class="prefopt">
<?php
if ($k != 1) {
?>
<input type="button" title="Move up" class="prefup" onclick="m_traintype('up',<?php
echo $r['dcid'];
?>
)"/> <?php
}
?>
<?php
if ($k != $n) {
?>
<input type="button" title="Move down" class="prefdn" onclick="m_traintype('dn',<?php
echo $r['dcid'];
?>
)"/><?php
} else {
?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php