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


PHP getDbSelect函数代码示例

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


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

示例1: getMenuUrlCode

 function getMenuUrlCode($site, $table, $parent, $depth, $uid, $code)
 {
     static $string;
     $xdepth = $depth + 1;
     $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . $xdepth . ' and parent=' . $parent . ' and hidden=0 and reject=0 order by gid asc', '*');
     while ($C = db_fetch_array($CD)) {
         $code1 = $code . $C['id'] . '/';
         $_code = substr($code1, 0, strlen($code1) - 1);
         $string .= "<url><loc>" . getRWurl('c=' . $_code) . "</loc></url>\n";
         if ($C['isson']) {
             getMenuUrlCode($site, $table, $C['uid'], $C['depth'], $uid, $code1);
         }
     }
     return $string;
 }
开发者ID:eosliebe,项目名称:rb,代码行数:15,代码来源:a.seo.php

示例2: getMenuCodeToSql

function getMenuCodeToSql($table, $cat, $f)
{
    static $sql;
    $R = getUidData($table, $cat);
    if ($R['uid']) {
        $sql .= $f . '=' . $R['uid'] . ' or ';
    }
    if ($R['isson']) {
        $RDATA = getDbSelect($table, 'parent=' . $R['uid'], 'uid');
        while ($C = db_fetch_array($RDATA)) {
            getMenuCodeToSql($table, $C['uid'], $f);
        }
    }
    return substr($sql, 0, strlen($sql) - 4);
}
开发者ID:eosliebe,项目名称:rb,代码行数:15,代码来源:menu.func.php

示例3: getMenuWidgetTree

 function getMenuWidgetTree($site, $table, $is_child, $parent, $depth, $id, $w, $_C)
 {
     global $_CA;
     if ($depth < $w['limit']) {
         $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'hidden=0 and parent=' . $parent . ' and depth=' . ($depth + 1) . ($w['mobile'] ? ' and mobile=1' : '') . ' order by gid asc', '*');
         echo "\n";
         for ($i = 0; $i < $depth; $i++) {
             echo "\t";
         }
         if ($is_child) {
             echo "<ul" . ($w['dropdown'] ? ' class="dropdown-menu" role="menu" aria-labelledby="dLabel"' : '') . ">\n";
             if ($w['dropdown'] && $w['dispfmenu']) {
                 echo $_C['link'];
                 echo '<li role="presentation" class="divider"></li>' . "\n";
             }
         }
         while ($C = db_fetch_array($CD)) {
             $_newTree = ($id ? $id . '/' : '') . $C['id'];
             $_href = $w['link'] == 'bookmark' ? ' data-scroll href="#' . ($C['is_child'] && $w['limit'] > 1 && !$parent && $w['dropdown'] ? '' : str_replace('/', '-', $_newTree)) . '"' : ' href="' . RW('c=' . $_newTree) . '"';
             $_dropdown = $w['dropdown'] && $C['is_child'] && $C['depth'] == $w['depth'] + 1 && $w['olimit'] > 1 ? ' class="dropdown-toggle" data-toggle="dropdown"' : '';
             $_name = $C['name'] . ($_dropdown ? ' <i class="caret"></i>' : '');
             $_target = $C['target'] == '_blank' ? ' target="_blank"' : '';
             $_addattr = $C['addattr'] ? ' ' . $C['addattr'] : '';
             for ($i = 0; $i < $C['depth']; $i++) {
                 echo "\t";
             }
             if ($_dropdown) {
                 echo '<li class="dropdown' . (in_array($C['id'], $_CA) ? ' active' : '') . '"><a' . $_addattr . $_href . $_dropdown . $_target . '>' . $_name . '</a>';
             } else {
                 echo '<li' . (in_array($C['id'], $_CA) ? ' class="active"' : '') . '><a' . $_addattr . $_href . $_dropdown . $_target . '>' . $_name . '</a>';
             }
             if ($C['is_child']) {
                 $C['link'] = '<li><a' . $_addattr . $_href . $_target . '>' . $C['name'] . '</a></li>';
                 getMenuWidgetTree($site, $table, $C['is_child'], $C['uid'], $C['depth'], $_newTree, $w, $C);
             }
             echo "</li>\n";
         }
         for ($i = 0; $i < $depth; $i++) {
             echo "\t";
         }
         if ($is_child) {
             echo "</ul>\n";
         }
         for ($i = 0; $i < $depth; $i++) {
             echo "\t";
         }
     }
 }
开发者ID:hanacody,项目名称:rb2,代码行数:48,代码来源:main.php

示例4: DeleteOneline

function DeleteOneline($C, $d, $sync_arr)
{
    global $table, $date;
    $_ONELINE = getDbSelect($table['s_oneline'], 'parent=' . $C['uid'], '*');
    while ($_O = db_fetch_array($_ONELINE)) {
        if ($d['comment']['give_opoint'] && $_O['mbruid']) {
            getDbInsert($table['s_point'], 'my_mbruid,by_mbruid,price,content,d_regis', "'" . $_O['mbruid'] . "','0','-" . $d['comment']['give_opoint'] . "','한줄의견삭제(" . getStrCut(str_replace('&amp;', ' ', strip_tags($_O['content'])), 15, '') . ")환원','" . $date['totime'] . "'");
            getDbUpdate($table['s_mbrdata'], 'point=point-' . $d['comment']['give_opoint'], 'memberuid=' . $_O['mbruid']);
        }
    }
    getDbDelete($table['s_oneline'], 'parent=' . $C['uid']);
    // 댓글 수량 동기화
    $sync_arr = explode('|', $R['sync']);
    $feed_table = $sync_arr[0];
    $feed_uid = $sync_arr[1];
    getDbUpdate($feed_table, 'oneline=oneline-1', 'uid=' . $feed_uid);
}
开发者ID:kieregh,项目名称:test_comment,代码行数:17,代码来源:action.func.php

示例5: getMenuShowSelect

function getMenuShowSelect($site, $table, $j, $parent, $depth, $uid, $hidden, $id)
{
    global $cat, $_isUid;
    static $j;
    $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . ($depth + 1) . ' and parent=' . $parent . ($hidden ? ' and hidden=0' : '') . ' order by gid asc', '*');
    while ($C = db_fetch_array($CD)) {
        $nId = ($id ? $id . '/' : '') . $C[$_isUid . 'id'];
        $j++;
        echo '<option class="selectcat' . $C['depth'] . '" value="' . $nId . '"' . ($nId == $cat ? ' selected' : '') . '>';
        for ($i = 1; $i < $C['depth']; $i++) {
            echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
        }
        if ($C['depth'] > 1) {
            echo 'ㄴ';
        }
        echo $C['name'] . ($C['num'] ? ' (' . $C['num'] . ')' : '') . '</option>';
        if ($C['is_child']) {
            getMenuShowSelect($site, $table, $j, $C['uid'], $C['depth'], $uid, $hidden, $nId);
        }
    }
}
开发者ID:hanacody,项目名称:rb2,代码行数:21,代码来源:menu1.func.php

示例6: getMenuTxt

function getMenuTxt($site, $table, $j, $parent, $depth, $uid, $code)
{
    global $g;
    static $j, $string;
    $xdepth = $depth + 1;
    $CD = getDbSelect($table, ($site ? 'site=' . $site . ' and ' : '') . 'depth=' . $xdepth . ' and parent=' . $parent . ' order by gid asc', '*');
    while ($C = db_fetch_array($CD)) {
        $j++;
        $code = $code . $C['id'] . '/';
        $_code = substr($code, 0, strlen($code) - 1);
        for ($i = 0; $i < $depth; $i++) {
            $string .= "\t";
        }
        $string .= '[' . $xdepth . ']' . ($C['hidden'] ? '[숨김]' : '') . ($C['reject'] ? '[차단]' : '') . ($C['target'] ? '[새창]' : '') . $C['name'] . " = " . RW('c=' . $_code) . "\r\n";
        if ($C['isson']) {
            getMenuTxt($site, $table, $j, $C['uid'], $C['depth'], $uid, $code);
        }
        if ($xdepth == 1) {
            $string .= "\r\n";
        }
        $code = '';
    }
    return $string;
}
开发者ID:eosliebe,项目名称:rb,代码行数:24,代码来源:menu.dump.func.php

示例7: getDbSelect

     //기존메뉴삭제
     if ($ACT_DM) {
         $_MENUS = getDbSelect($table['s_menu'], 'site=' . $S['uid'] . ' order by gid asc', '*');
         while ($_M = db_fetch_array($_MENUS)) {
             @unlink($g['path_var'] . 'menu/' . $_M['imghead']);
             @unlink($g['path_var'] . 'menu/' . $_M['imgfoot']);
             getDbDelete($table['s_seo'], 'rel=1 and parent=' . $_M['uid']);
         }
         getDbDelete($table['s_menu'], 'site=' . $S['uid']);
         db_query("OPTIMIZE TABLE " . $table['s_menu'], $DB_CONNECT);
         db_query("OPTIMIZE TABLE " . $table['s_seo'], $DB_CONNECT);
         DirDelete($g['path_page'] . $S['id'] . '-menus');
     }
     //기존페이지삭제
     if ($ACT_DP) {
         $_PAGES = getDbSelect($table['s_page'], 'site=' . $S['uid'] . ' order by uid asc', '*');
         while ($_P = db_fetch_array($_PAGES)) {
             getDbDelete($table['s_seo'], 'rel=2 and parent=' . $_P['uid']);
         }
         getDbDelete($table['s_page'], 'site=' . $S['uid']);
         db_query("OPTIMIZE TABLE " . $table['s_page'], $DB_CONNECT);
         db_query("OPTIMIZE TABLE " . $table['s_seo'], $DB_CONNECT);
         DirDelete($g['path_page'] . $S['id'] . '-pages');
     }
     @rename($g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $d['package']['siteid'] . '-menus', $g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $S['id'] . '-menus');
     @rename($g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $d['package']['siteid'] . '-pages', $g['path_tmp'] . 'app/' . $package_folder . '/pages/' . $S['id'] . '-pages');
 } else {
     $MAXC = getDbCnt($table['s_site'], 'max(gid)', '');
     $gid = $MAXC + 1;
     $name = 'SITE ' . $gid;
     $id = 's' . date('His');
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:a.add_package.php

示例8: getDbSelect

>멕시코</option>
				<option value="seychelles"<?php 
    if ($r == "seychelles") {
        ?>
 selected="selected"<?php 
    }
    ?>
>세이쉘</option>
			</select>
			<?php 
}
?>
			<!-- / 통합 트레비아 임시 조치 -->

			<?php 
$resCate = getDbSelect($table[$m . 'data'], "site=" . $s . " AND bbsid='resort'", "subject");
?>
			<select onchange="document.bbssearchf.cat.value=this.value;document.bbssearchf.submit();">
			<option value="">&nbsp;+ 리조트 선택</option>
			<option value="" class="sline">-------------------</option>
			<?php 
while ($infoCate = db_fetch_array($resCate)) {
    ?>
			<option value="<?php 
    echo $infoCate[0];
    ?>
"<?php 
    if ($infoCate[0] == $R['category'] || $infoCate[0] == $cat) {
        ?>
 selected="selected"<?php 
    }
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:list.php

示例9: getTreeMenu

function getTreeMenu($conf, $cat, $code, $depth, $parent, $tmpcode)
{
    $id = 'tree_' . filterstr(microtime());
    $tree = '<div class="rb-tree"><ul id="' . $id . '">';
    $CD = getDbSelect($conf['table'], ($conf['site'] ? 'site=' . $conf['site'] . ' and ' : '') . 'depth=' . ($depth + 1) . ' and parent=' . $parent . ($conf['dispHidden'] ? ' and hidden=0' : '') . ' order by gid asc', '*');
    $_i = 0;
    while ($C = db_fetch_array($CD)) {
        $rcode = $tmpcode ? $tmpcode . '/' . $C['uid'] : $C['uid'];
        $topen = $rcode == substr($code, 0, strlen($rcode)) ? true : false;
        $tree .= '<li>';
        if ($C['isson']) {
            $tree .= '<a data-toggle="collapse" href="#' . $id . '-' . $_i . '-' . $C['uid'] . '" class="rb-branch' . ($conf['allOpen'] || $topen ? '' : ' collapsed') . '"></a>';
            $tree .= '<a href="' . $conf['link'] . $C['uid'] . '&amp;code=' . $rcode . ($conf['bookmark'] ? '#' . $conf['bookmark'] : '') . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>';
            if ($conf['dispCheckbox']) {
                $tree .= '<input type="checkbox" name="tree_members[]" value="' . $C['uid'] . '">';
            }
            $tree .= $C['name'] . '</span></a>';
            if ($conf['dispNum'] && $C['num']) {
                $tree .= ' <small>(' . $C['num'] . ')</small>';
            }
            if ($C['mobile']) {
                $tree .= '<i class="glyphicon glyphicon-phone" title="모바일"></i>';
            }
            if ($C['hidden']) {
                $tree .= '<i class="glyphicon glyphicon-eye-close" title="숨김"></i>';
            }
            if ($C['reject']) {
                $tree .= '<i class="glyphicon glyphicon-ban-circle" title="차단"></i>';
            }
            $tree .= '<ul id="' . $id . '-' . $_i . '-' . $C['uid'] . '" class="collapse' . ($conf['allOpen'] || $topen ? ' in' : '') . '">';
            $tree .= getTreeMenu($conf, $cat, $code, $C['depth'], $C['uid'], $rcode);
            $tree .= '</ul>';
        } else {
            $tree .= '<a href="#." class="rb-leaf"></a>';
            $tree .= '<a href="' . $conf['link'] . $C['uid'] . '&amp;code=' . $rcode . ($conf['bookmark'] ? '#' . $conf['bookmark'] : '') . '"><span' . ($code == $rcode ? ' class="rb-active"' : '') . '>';
            if ($conf['dispCheckbox']) {
                $tree .= '<input type="checkbox" name="tree_members[]" value="' . $C['uid'] . '">';
            }
            $tree .= $C['name'] . '</span></a>';
            if ($conf['dispNum'] && $C['num']) {
                $tree .= ' <small>(' . $C['num'] . ')</small>';
            }
            if ($C['mobile']) {
                $tree .= '<i class="glyphicon glyphicon-phone" title="모바일"></i>';
            }
            if ($C['hidden']) {
                $tree .= '<i class="glyphicon glyphicon-eye-close" title="숨김"></i>';
            }
            if ($C['reject']) {
                $tree .= '<i class="glyphicon glyphicon-ban-circle" title="차단"></i>';
            }
        }
        $tree .= '</li>';
        $_i++;
    }
    $tree .= '</ul></div>';
    return $tree;
}
开发者ID:eosliebe,项目名称:rb,代码行数:58,代码来源:sys.func.php

示例10: getDbArray

$SITES = getDbArray($table['s_site'], '', '*', 'gid', 'asc', 0, 1);
$year1 = $year1 ? $year1 : substr($date['today'], 0, 4);
$month1 = $month1 ? $month1 : substr($date['today'], 4, 2);
$day1 = $day1 ? $day1 : 1;
$year2 = $year2 ? $year2 : substr($date['today'], 0, 4);
$month2 = $month2 ? $month2 : substr($date['today'], 4, 2);
$day2 = $day2 ? $day2 : substr($date['today'], 6, 2);
$p = $p ? $p : 1;
$recnum = $recnum && $recnum < 200 ? $recnum : 20;
$sort = $sort ? $sort : 'hit';
$orderby = $orderby ? $orderby : 'desc';
$accountQue = $account ? 'site=' . $account . ' and ' : '';
$_WHERE1 = $accountQue . 'date >= ' . $year1 . sprintf('%02d', $month1) . sprintf('%02d', $day1) . ' and date <= ' . $year2 . sprintf('%02d', $month2) . sprintf('%02d', $day2);
$_WHERE2 = 'keyword,sum(hit) as hit';
$RCD = getDbSelect($table['s_inkey'], $_WHERE1 . ' group by keyword order by ' . $sort . ' ' . $orderby . ' limit 0,' . $recnum, $_WHERE2);
?>
 



<form name="procForm" action="<?php 
echo $g['s'];
?>
/" method="get">
<input type="hidden" name="r" value="<?php 
echo $r;
?>
" />
<input type="hidden" name="m" value="<?php 
echo $m;
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:30,代码来源:inkeyword.php

示例11: getDbSelect

		<div class="category">
			
			<?php 
if ($type != 'follower') {
    ?>
			<select onchange="goHref('<?php 
    echo $g['url_page'];
    ?>
&type=<?php 
    echo $type;
    ?>
&category='+this.value);">
			<option value="">&nbsp;+ 전체</option>
			<option value="">-------------</option>
			<?php 
    $_CATS = getDbSelect($table['s_friend'], "my_mbruid=" . $my['uid'] . " and category<>'' group by category", 'category');
    ?>
			<?php 
    while ($_R = db_fetch_array($_CATS)) {
        ?>
			<option value="<?php 
        echo $_R['category'];
        ?>
"<?php 
        if ($_R['category'] == $category) {
            ?>
 selected="selected"<?php 
        }
        ?>
>ㆍ<?php 
        echo $_R['category'];
开发者ID:kieregh,项目名称:rb1.2,代码行数:31,代码来源:friend.php

示例12: getDbSelect

			</ul>
		</div>

		<div class="lnb<?php 
if ($my['id']) {
    ?>
 in<?php 
} else {
    ?>
 out<?php 
}
?>
">
			<ul>
			<?php 
$_MENUS1 = getDbSelect($table['s_menu'], 'site=' . $s . ' and hidden=0 and depth=1 order by gid asc', '*');
?>
			<?php 
$infoDubai = db_fetch_array(getDbArray($table['bbsdata'], "site=6 AND category='두바이'", "uid", "", "rand()", 1, 1));
// $infoThailand1 = db_fetch_array(getDbArray($table['bbsdata'],"site=4 AND category='미주허니문'","uid","","rand()",1,1));
$infoThailand1 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='푸켓'", "uid", "", "rand()", 1, 1));
$infoThailand4 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='보라카이'", "uid", "", "rand()", 1, 1));
$infoThailand2 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='하와이'", "uid", "", "rand()", 1, 1));
$infoThailand3 = db_fetch_array(getDbArray($table['bbsdata'], "site=4 AND category='코사무이'", "uid", "", "rand()", 1, 1));
$infoIndonesia1 = db_fetch_array(getDbArray($table['bbsdata'], "site=5 AND category='발리'", "uid", "", "rand()", 1, 1));
$infoIndonesia2 = db_fetch_array(getDbArray($table['bbsdata'], "site=5 AND category='롬복'", "uid", "", "rand()", 1, 1));
$infoSeychelles = db_fetch_array(getDbArray($table['bbsdata'], "site=8 AND bbsid='resort'", "uid", "", "rand()", 1, 1));
//15-11-12 칸쿤만 랜덤함수 13XXX으로 시작하면 여행후기로 넘어가서 강제로 임의의 숫자를 주었음.
//난수 발생 로직이 왜 필요한지는 파악이 안됨.
// $infoMexico = db_fetch_array(getDbArray($table['bbsdata'],"site=7 AND category='칸쿤'","uid","","rand()",1,1));
$infoMexico = db_fetch_array(getDbArray($table['bbsdata'], "site=7 AND category='칸쿤'", "uid", "", "2786", 1, 1));
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:main.php

示例13: str_replace

?>
/<?php 
echo $TPG;
?>
페이지)
		</div>
		<div class="category">

			<select onchange="goHref('<?php 
echo str_replace('&amp;', '&', $g['url_page']);
?>
&category='+this.value);">
			<option value="">&nbsp;+ 전체</option>
			<option value="">-------------</option>
			<?php 
$_CATS = getDbSelect($table['s_scrap'], "mbruid=" . $M['memberuid'] . " and category<>'' group by category", 'category');
?>
			<?php 
while ($_R = db_fetch_array($_CATS)) {
    ?>
			<option value="<?php 
    echo $_R['category'];
    ?>
"<?php 
    if ($_R['category'] == $category) {
        ?>
 selected="selected"<?php 
    }
    ?>
>ㆍ<?php 
    echo $_R['category'];
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:scrap.php

示例14: getDbSelect

/" method="post">
					<input type="hidden" name="r" value="<?php 
    echo $r;
    ?>
">
					<input type="hidden" name="m" value="<?php 
    echo $module;
    ?>
">
					<input type="hidden" name="a" value="modifygid">
					
					<div class="panel-body" style="border-top:1px solid #DEDEDE;">
				        <div class="dd" id="nestable-menu">
				            <ol class="dd-list">
							<?php 
    $_MENUS = getDbSelect($table['s_domain'], 'parent=' . intval($CINFO['uid']) . ' and depth=' . ($CINFO['depth'] + 1) . ' order by gid asc', '*');
    ?>
							<?php 
    $_i = 1;
    while ($_M = db_fetch_array($_MENUS)) {
        ?>
								
				                <li class="dd-item" data-id="<?php 
        echo $_i;
        ?>
">
									<input type="checkbox" name="menumembers[]" value="<?php 
        echo $_M['uid'];
        ?>
" checked class="hidden">
				                    <div class="dd-handle"><i class="fa fa-arrows fa-fw"></i> <?php 
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:main.php

示例15: substr

if ($where == 'term' && $keyword) {
    $_yr = substr($keyword, 0, 4);
    $_mh = substr($keyword, 4, 2);
} else {
    $_yr = $_yr ? $_yr : $date['year'];
    $_mh = $_mh ? $_mh : substr($date['month'], 4, 2);
}
$todaynum = $date['today'];
$firstday = mktime(0, 0, 0, $_mh, 1, $_yr);
$startday = date('w', $firstday);
$endday = date('t', $firstday);
$prevyear = date('Y', mktime(0, 0, 0, $_mh - 1, 1, $_yr));
$nextyear = date('Y', mktime(0, 0, 0, $_mh + 1, 1, $_yr));
$prevmonth = date('m', mktime(0, 0, 0, $_mh - 1, 1, $_yr));
$nextmonth = date('m', mktime(0, 0, 0, $_mh + 1, 1, $_yr));
$DAYNUM = getDbSelect($table['bbsday'], "date like '" . $_yr . $_mh . "%' and site=" . $s . ' order by date asc', '*');
while ($_R = db_fetch_array($DAYNUM)) {
    if ($_R['num']) {
        $_D[$_R['date']] = $_R['num'];
    }
}
?>
			
			<div class="daily">
				<a name="calendar"></a>
				<div class="tt">
					<a href="<?php 
echo $g['s'];
?>
/?r=<?php 
echo $r;
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:main.php


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