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


PHP gcms_fetch_row函数代码示例

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


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

示例1: load_menu

/**
 * Mengambil data menu
 */
function load_menu()
{
    $csql = "select cgroup, nid from " . PREFIX . "groupfrontmenus order by nurut, cgroup";
    $nresult = gcms_query($csql);
    $i = 0;
    $menus = array();
    while ($ogroup = gcms_fetch_object($nresult)) {
        if (b_admin(b_getuserlogin())) {
            $cwhere = "where a.nid_groupfrontmenus='" . $ogroup->nid . "'";
        } else {
            $cwhere = "left join " . PREFIX . "grantedfrontmenus as b on a.nid=b.nid_frontmenus\r\n                              where a.nid_groupfrontmenus='" . $ogroup->nid . "'  and \r\n                              (b.nid_users='" . b_getuserlogin() . "' or a.bsecure=0)";
        }
        $csql = "select a.* from " . PREFIX . "frontmenus as a {$cwhere} order by a.nurut, a.cmenu";
        $nresult2 = gcms_query($csql);
        if (gcms_fetch_row($nresult2)) {
            if (!$ogroup->bhide) {
                $menus[$i][0] = str_replace(" ", " ", stripslashes($ogroup->cgroup));
                $j = 1;
                $nresult2 = gcms_query($csql);
                while ($omenu = gcms_fetch_object($nresult2)) {
                    if ($omenu->bsecure and b_logged() or !$omenu->bsecure) {
                        $menus[$i][$j][0] = build_menu($omenu);
                        $menus[$i][$j][1] = stripslashes($omenu->cmenu);
                        $j++;
                    }
                }
                $i++;
            }
        }
    }
    return $menus;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:35,代码来源:lib_menu_old.php

示例2: b_modulgranted

/**
 * Digunakan untuk melakukan validasi atas hak seorang user untuk menggunakan sebuah modul
 *
 * @param integer $nid
 * @param string $modulsname
 * @return TRUE/FALSE
 */
function b_modulgranted($nid_user, $modul)
{
    $breturn = true;
    if ($nid_user != 1) {
        $csql = "select a.nid\r\n\t\t\t   from " . PREFIX . "granted a\r\n\t\t\t   inner join " . PREFIX . "moduls b on a.nid_moduls=b.nid\r\n\t\t       where a.nid_users='{$nid_user}' and b.nid='{$modul}'";
        $nresult = gcms_query($csql);
        if (!gcms_fetch_row($nresult)) {
            $breturn = false;
        }
    }
    return $breturn;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:19,代码来源:lib_pr.php

示例3: UPPER

     }
     if ($postConfig['search'] == 'true') {
         $sql .= ' and UPPER(' . $postConfig['searchField'] . ') ' . fnSearchCondition($_POST['searchOper'], $postConfig['searchStr']);
     }
     $sql .= ' ORDER BY ' . $postConfig['sortColumn'] . ' ' . $postConfig['sortOrder'];
     //if($postConfig['search'] == true){ $sql .= ' where '.$searchCondition; }
     if ($DEBUGMODE == 1) {
         $firephp->info($sql, 'query');
     }
     $result = gcms_query($sql) or die($firephp->error('Couldn t execute query.' . mysql_error()));
     /*Create the output object*/
     $o->page = $intPage;
     $o->total = $total_pages;
     $o->records = $count;
     $i = 0;
     while ($row = gcms_fetch_row($result)) {
         /* 1st column needs to be the id, even if it's not named ID */
         $o->rows[$i]['id'] = $row[0];
         /* assign the row contents to a row var. */
         $o->rows[$i][$crudConfig['row']] = $row;
         $i++;
     }
     break;
 case $crudConfig['create']:
     /* ----====|| ACTION = CREATE ||====----*/
     if ($DEBUGMODE == 1) {
         $firephp->info('CREATE', 'action');
     }
     /*basic start to the insert query*/
     //	    print_r( $crudColumnValues );
     unset($crudColumns['id']);
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:31,代码来源:handler_pendaftaran_bu.php

示例4: load_menu

/**
 * Mengambil data menu
 */
function load_menu()
{
    $csql = "select a.nid,a.bhide,a.cgroup from " . PREFIX . "groupfrontmenus a order by a.nurut, a.cgroup";
    $nresult = gcms_query($csql);
    $i = 0;
    $menus = array();
    while ($ogroup = gcms_fetch_object($nresult)) {
        if (b_admin(b_getuserlogin())) {
            $cwhere = "where a.nid_groupfrontmenus='" . $ogroup->nid . "' and a.BHIDE=0";
        } else {
            $cwhere = "left join " . PREFIX . "grantedfrontmenus as b on a.nid=b.nid_frontmenus\r\n\t\t       \t\t\t\t\t\t\twhere a.nid_groupfrontmenus='" . $ogroup->nid . "'  and \r\n\t\t\t         \t\t\t\t\t(b.nid_users='" . b_getuserlogin() . "' or a.bsecure=0)";
        }
        //$csql="select a.* from ".PREFIX."frontmenus as a $cwhere order by a.nurut, a.cmenu";
        $csql = "select a.nid,a.is_main,a.bsecure,a.bhide,a.cmenu,a.width,a.height,a.nid_header from " . PREFIX . "frontmenus as a {$cwhere} order by a.nid_header, a.NURUT";
        $nresult2 = gcms_query($csql);
        if (gcms_fetch_row($nresult2)) {
            if ($ogroup->bhide == 0) {
                $menus[$i][0] = str_replace(" ", " ", stripslashes($ogroup->cgroup));
                $j = 1;
                $k = 0;
                $id_lama = ' ';
                $flag_g = '';
                $nresult2 = gcms_query($csql);
                while ($omenu = gcms_fetch_object($nresult2)) {
                    if ($omenu->bsecure and b_logged() and $omenu->bhide == 0) {
                        $nm = str_replace(".", "_", str_replace("-", "_", str_replace(" ", "_", stripslashes($omenu->cmenu))));
                        if (!$omenu->width) {
                            $omenu->width = 700;
                        }
                        if (!$omenu->height) {
                            $omenu->height = 500;
                        }
                        if (!empty($omenu->nid_header)) {
                            if ($omenu->nid_header != $id_lama) {
                                if ($flag_g == 1) {
                                    $j++;
                                }
                                $k = 0;
                                $nama_skpd = b_fetch("select cname from g_subgroupfrontmenus where nid={$omenu->nid_header}");
                                $menus[$i][$j][$k] = $nama_skpd;
                                $flag_g = 1;
                            }
                            $k++;
                            $id_lama = $omenu->nid_header;
                            if ($omenu->is_main) {
                                $menus[$i][$j][$k][0] = "index.php?page=" . $omenu->nid;
                            } else {
                                $menus[$i][$j][$k][0] = "javascript:gcms_open_form('form.php?page=" . $omenu->nid . "','" . $nm . "'," . $omenu->width . "," . $omenu->height . ")";
                            }
                            $menus[$i][$j][$k][1] = stripslashes($omenu->cmenu);
                        } else {
                            if ($omenu->is_main) {
                                $menus[$i][$j][0] = "index.php?page=" . $omenu->nid;
                            } else {
                                $menus[$i][$j][0] = "javascript:gcms_open_form('form.php?page=" . $omenu->nid . "','" . $nm . "'," . $omenu->width . "," . $omenu->height . ")";
                            }
                            $menus[$i][$j][1] = stripslashes($omenu->cmenu);
                            $j++;
                            $flag_g = 0;
                        }
                    }
                }
                //echo "</ul></td></tr></table><!--[if lte IE 6]></a><![endif]--></li>";
                $i++;
            }
        }
    }
    return $menus;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:72,代码来源:lib_menu.php

示例5: b_urlact

    ?>
</ul></div><br/>
<?php 
}
?>

<table class="table_admin2">
	<form action="<?php 
echo b_urlact() . "&cpage=" . $_REQUEST['cpage'];
?>
#go" method="POST">
<?php 
!b_admin($_SESSION['nid_login']) ? $cwhere = " where (nstatus<'" . USERLEVEL . "' or nid<>'" . $_SESSION['nid_login'] . "') and cuser<>'admin'" : ($cwhere = " where cuser<>'admin'");
$csql = "select * from " . PREFIX . "users {$cwhere} order by cuser ";
$nresult = gcms_query($csql);
if (gcms_fetch_row($nresult)) {
    ?>
    <tr>
        <td width="20%">Username</td>
        <td>
            <select name="nid" class="field">
            <option value=""></option>
<?php 
    while ($ouser = gcms_fetch_object($nresult)) {
        $ouser->nid == $_POST['nid'] ? $cselect = "selected" : ($cselect = "");
        echo "<option value=\"{$ouser->nid}\" {$cselect} >{$ouser->cname} ({$ouser->cuser})</option>";
    }
    ?>
            </select>&nbsp;&nbsp;<input type="submit" name="csubmit" value="Go"></td>
    </tr>
    </form>
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:31,代码来源:menu_granter.php

示例6: session_start

<?php

session_start();
session_regenerate_id();
/* ambil konfigurasi */
require_once 'config.php';
/* kalau belum ada struktur database-nya, bikin dulu */
$nresult = gcms_list_tables("");
$o = gcms_fetch_row($nresult);
if (!$o) {
    $cfile = "gcms.sql";
    $fsql = @fopen($cfile, "r");
    $csql = fread($fsql, filesize($cfile));
    fclose($fsql);
    gcms_run_query_block($csql);
}
/* ambil library berisi sekumpulan fungsi mendasar */
require_once 'lib.php';
/* pre processing untuk data daftar yang di-pass lewat url */
$daftars = explode(",", $_REQUEST['daftars']);
foreach ($daftars as $daftar) {
    if ($daftar) {
        global ${$daftar . '_data'}, ${$daftar . '_deleted'};
        /* ubah data daftar ke dalam bentuk array */
        ${$daftar . '_data'} = array();
        $rows = explode("|", $_REQUEST[$daftar . '_data']);
        $fields = explode(",", $rows[0]);
        for ($i = 1; $i < count($rows); $i++) {
            if ($rows[$i]) {
                $data = explode(",", $rows[$i]);
                $d = array();
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:31,代码来源:_global.php


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