Exemple #1
0
function get_course_types()
{
    $query = 'SELECT course_type_cde, course_type_desc, sort_order
                from course_type
                order by sort_order';
    return get_list($query);
}
Exemple #2
0
function latest($skin_dir = "", $bo_table, $rows = 10, $subject_len = 40, $options = "")
{
    global $g4;
    if ($skin_dir) {
        $GLOBALS['latest_skin_path'] = $latest_skin_path = "{$g4['path']}/skin/latest/{$skin_dir}";
    } else {
        $GLOBALS['latest_skin_path'] = $latest_skin_path = "{$g4['path']}/skin/latest/basic";
    }
    $list = array();
    $sql = " select * from {$g4['board_table']} where bo_table = '{$bo_table}'";
    $board = sql_fetch($sql);
    $tmp_write_table = $g4['write_prefix'] . $bo_table;
    // 게시판 테이블 전체이름
    $sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";
    //explain($sql);
    $result = sql_query($sql);
    for ($i = 0; $row = sql_fetch_array($result); $i++) {
        $list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
    }
    ob_start();
    include "{$latest_skin_path}/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
function get_signup_dates()
{
    $query = 'SELECT grade_lvl, mode_desc, signup_dates_mode.mode_cde, start, end
              FROM signup_dates, signup_dates_mode
              WHERE signup_dates.mode_cde = signup_dates_mode.mode_cde and grade_lvl != 13';
    return get_list($query);
}
Exemple #4
0
 function __construct($coach_id)
 {
     // MySQL stored information
     $this->coach_id = $coach_id;
     $this->setStats(false, false, false);
     $this->ring = (int) $this->ring;
     if (empty($this->mail)) {
         $this->mail = '';
     }
     # Re-define as empty string, and not numeric zero.
     if (empty($this->phone)) {
         $this->phone = '';
     }
     # Re-define as empty string, and not numeric zero.
     if (empty($this->realname)) {
         $this->realname = '';
     }
     # Re-define as empty string, and not numeric zero.
     // Coach's site settings.
     $this->settings = array();
     // Is overwriten to type = string when loading MySQL data into this object.
     foreach (get_list('coaches', 'coach_id', $this->coach_id, 'settings') as $set) {
         list($key, $val) = explode('=', $set);
         $this->settings[$key] = $val;
     }
     global $settings;
     $init = array('theme' => 1, 'lang' => Translations::fallback, 'home_lid' => null);
     // Setting values which must be initialized if not stored/saved in mysql.
     foreach ($init as $key => $val) {
         if (!array_key_exists($key, $this->settings) || !isset($this->settings[$key])) {
             $this->settings[$key] = $val;
         }
     }
 }
function get_session_times()
{
    $query = 'SELECT ses_id, ses_name, ses_start, ses_end 
					from session_times
					order by sort_order';
    return get_list($query);
}
Exemple #6
0
function get_room_list()
{
    $query = 'SELECT rm_nbr, rm_id
              from room
              
			  order by rm_nbr';
    return get_list($query);
}
Exemple #7
0
function get_rooms()
{
    $query = 'select distinct rm_nbr, p.rm_id
                from presentation p, room r
                where p.rm_id = r.rm_id
                order by r.rm_nbr;';
    return get_list($query);
}
function get_teacher_list()
{
    $query = 'SELECT teacher_id, last_name, first_name, display_name
                from teacher
                where active = 1
                order by last_name, first_name';
    return get_list($query);
}
Exemple #9
0
function get_user_list()
{
    $query = 'SELECT usr_id, usr_bca_id, usr_type_cde, usr_class_year, usr_grade_lvl, 
                 usr_first_name, usr_last_name, usr_active
              from user
              where usr_active = 1
			  order by usr_grade_lvl desc, usr_last_name, usr_first_name ';
    return get_list($query);
}
Exemple #10
0
function get_mentors()
{
    $query = 'SELECT mentor.mentor_id,  mentor_last_name ,  mentor_first_name ,  mentor_field ,
					mentor_position , mentor_company ,  mentor_profile ,  mentor_keywords ,
					active ,  pres_room , pres_host_teacher ,
					pres_max_capacity
					from mentor
					order by mentor.mentor_last_name';
    return get_list($query);
}
Exemple #11
0
function get_signup_dates_list()
{
    $query = 'SELECT signup_dates.class_year, class_year, start, end,
                    GET_SCHEDULE_TIMES_LIST (signup_dates.class_year) as times
                from signup_dates
                inner join course_type
                on course.course_type_cde = course_type.course_type_cde
                inner join teacher
                on course.teacher_id = teacher.teacher_id
                where course.active = 1
                order by course.course_nbr';
    return get_list($query);
}
Exemple #12
0
function get_mentor_list()
{
    $query = 'SELECT mentor.mentor_id, mentor_last_name, mentor_first_name, mentor_field,
                 mentor_position, mentor_company, mentor_profile, mentor_keywords,
                  active, pres_room, pres_host_teacher, pres_max_capacity, 
                  GROUP_CONCAT(ses_id order by ses_id SEPARATOR \', \') as sessions
              from mentor
              left join presentation on mentor.mentor_id = presentation.mentor_id
              where active = 1
              group by mentor.mentor_id
			  order by mentor_last_name';
    return get_list($query);
}
Exemple #13
0
function get_presentation_list()
{
    $query = 'SELECT workshop.wkshp_nme, presentation.pres_id, presentation.org_name, presentation.rm_id,
                    pres_max_teachers, pres_max_seats, pres_enrolled_teachers, pres_enrolled_seats,
                    pres_max_seats - presentation.pres_enrolled_seats as remaining, 
                    presenter_names, rm_nbr, ses_start_time, ses_end_time, presentation.ses_id, presentation.wkshp_id
                FROM presentation, room, session_times, workshop 
                WHERE presentation.rm_id = room.rm_id
                    and presentation.ses_id = session_times.ses_id
                    and presentation.wkshp_id = workshop.wkshp_id
                    
                order by rm_nbr, presentation.ses_id ';
    return get_list($query);
}
function get_course_list()
{
    $query = 'SELECT course.course_id, course_name, course_nbr, course_short_name, 
                    course_desc, course_type_desc, teacher.display_name, 
                    course.course_nbr, 
                    GET_SCHEDULE_TIMES_LIST (course.course_id) as times
                from course
                inner join course_type
                on course.course_type_cde = course_type.course_type_cde
                inner join teacher
                on course.teacher_id = teacher.teacher_id
                where course.active = 1
                order by course.course_nbr';
    return get_list($query);
}
Exemple #15
0
function getWriteTable($bo_table, $boardTableRow)
{
    global $currentPageNo, $rowsPerPage, $write_prefix;
    $board = $boardTableRow[0];
    $subject_len = 40;
    $startPage = ($currentPageNo - 1) * $rowsPerPage;
    $endPage = $rowsPerPage;
    $tmp_write_table = $write_prefix . $bo_table;
    // 게시판 테이블 전체이름
    $sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num LIMIT  {$startPage}, {$endPage} ";
    $result = sql_query($sql);
    $resultArray = array();
    for ($i = 0; $row = sql_fetch_array($result); $i++) {
        $resultArray[$row['wr_id']] = get_list($row, $board, '', $subject_len);
    }
    if (count($resultArray) == 0) {
        $resultArray["status_msg"] = "list no length";
        $resultArray["status_code"] = "-2";
    } else {
        $resultArray["status_msg"] = "success";
        $resultArray["status_code"] = "0";
    }
    return $resultArray;
}
Exemple #16
0
if ($key != 'e3dc653e2d68697346818dfc0b208322') {
    $result = array('success' => false, 'result' => -2, 'error_msg' => "添加失败,标识码有误!");
    echo json_encode($result);
    exit;
}
$shop_info = new shop_infoBean($db, 'shop_info');
$sys_dict = new sys_dictBean($db, 'sys_dict');
$sys_area = new sys_areaBean($db, 'sys_area');
$sys_user = new sys_userBean($db, 'sys_user');
$user_order = new user_orderBean($db, 'user_order');
$user_order_goods = new user_order_goodsBean($db, 'user_order_goods');
$user_comment = new user_commentBean($db, 'user_comment');
switch ($act) {
    case 'list':
        //商家列表
        $result = get_list($db, $user_comment, $user_order, $shop_info);
        break;
    case 'info':
        //商家信息
        $result = detail($db, $shop_info, $user_comment, $user_order);
        break;
    case 'order_list':
        //获取商家订单列表
        $result = get_order_list($sid, $user_order, $sys_user, $sys_dict, $user_order_goods);
        break;
    case 'type':
        $result = get_type($db, $sys_dict);
        break;
    case 'trading_mode':
        $result = trading_mode($sid, $shop_info);
        //获取商家交易模式
function get_registered_users()
{
    $query = 'SELECT completed.usr_grade_lvl, completed.num AS Complete, partial.num AS Partial, none.num AS None
    FROM
    (SELECT usr_grade_lvl, sum(num) AS num
    FROM
    (SELECT distinct grade_lvl as usr_grade_lvl, 0 AS num
    FROM signup_dates

    UNION

    SELECT usr_grade_lvl, count(*) AS num
    FROM (
    SELECT usr_grade_lvl, user.usr_id, count(*) AS num_sessions
    FROM user 
    INNER JOIN user_presentation_xref ON user_presentation_xref.usr_id = user.usr_id
    WHERE usr_active = 1
    GROUP BY usr_grade_lvl, user.usr_id
    HAVING num_sessions = 4
    ) temp
    GROUP BY usr_grade_lvl ) a

    GROUP BY usr_grade_lvl) completed

    INNER JOIN (
    SELECT usr_grade_lvl, sum(num) AS num
    FROM
    (SELECT distinct grade_lvl as usr_grade_lvl, 0 AS num
    FROM signup_dates

    UNION
    SELECT usr_grade_lvl, count(*) AS num
    FROM (
    SELECT usr_grade_lvl, user.usr_id, count(*) AS num_sessions
    FROM user 
    INNER JOIN user_presentation_xref ON user_presentation_xref.usr_id = user.usr_id
    WHERE usr_active = 1
    GROUP BY usr_grade_lvl, user.usr_id
    HAVING num_sessions < 4
    ) temp
    GROUP BY usr_grade_lvl
     ) a

    GROUP BY usr_grade_lvl

    ) partial ON completed.usr_grade_lvl = partial.usr_grade_lvl



    INNER JOIN (
    SELECT usr_grade_lvl, sum(num) AS num
    FROM
    (SELECT distinct grade_lvl as usr_grade_lvl, 0 AS num
    FROM signup_dates

    UNION
    SELECT usr_grade_lvl, count(*) AS num
    FROM user
    LEFT JOIN user_presentation_xref ON user_presentation_xref.usr_id= user.usr_id
    WHERE user_presentation_xref.usr_id IS NULL
    AND usr_active = 1
    GROUP BY usr_grade_lvl
    ) a

    GROUP BY usr_grade_lvl

    ) none ON completed.usr_grade_lvl = none.usr_grade_lvl
    ORDER BY usr_grade_lvl;';
    return get_list($query);
}
Exemple #18
0
 public static function render_list()
 {
     $list = get_list();
     $langs = null;
     foreach ($list as $code => $name) {
         $langs .= LANG == $code ? '<a href="' . LOCAL . $code . (u0 ? '/' . PATH : '') . '" class="active" title="' . $name . '"><img src="' . LOCAL . 'images/flags/' . $code . '.png" alt="' . $code . '" /></a> ' : '<a href="' . LOCAL . $code . (u0 ? '/' . PATH : '') . '" class="inactive" title="' . $name . '"><img src="' . LOCAL . 'images/flags/' . $code . '.png" alt="' . $code . '" /></a> ';
     }
     return $langs;
 }
<?php

session_start();
require_once dirname(__FILE__) . '/../../utils/http_response_code.php';
if (!isset($_SESSION['adm']) || $_SESSION['adm'] !== true) {
    http_response_code(401);
    die;
}
require_once dirname(__FILE__) . '/../../account/config/deployment_environment.php';
require_once dirname(__FILE__) . '/../../connect.php';
require_once dirname(__FILE__) . '/get_list_fieldnames.php';
require_once dirname(__FILE__) . '/../common/get_list.php';
$link = connect();
$stmt = get_list($link, 'vtest_type_resources');
$data = array();
$testResourceIds = array();
$langs = array($_SESSION['if_lang']);
foreach ($_SESSION['interface_languages'] as $language) {
    if ($language['val'] !== $_SESSION['if_lang']) {
        $langs[] = $language['val'];
    }
}
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
    if (!isset($data[$row['tresourceid']])) {
        $data[$row['tresourceid']] = array(array());
    }
    $data[$row['tresourceid']][0][$row['ttypeid']] = array('name' => $row['ttypedesc'], 'val' => $row['ttypeid']);
    $data[$row['tresourceid']][array_search($row['tresourcelang'], $langs) + 1] = $row['tresourcedesc'];
    $testResourceIds[$row['tresourceid']] = $row['tresourceid'];
}
$data = array_values($data);
Exemple #20
0
            }
        }
        if (!empty($_GET['source'])) {
            $source = $_GET["source"];
            $wheresql .= " AND `source` like '%" . $source . "%'";
        }
        if (!empty($_GET['title'])) {
            $wheresql .= " AND `parent_id` = '" . $_GET["title"] . "' ";
        }
    }
    $total_sql = "SELECT COUNT(*) AS num FROM " . table('relation') . $wheresql;
    $total_val = $db->get_total($total_sql);
    $page = new page(array('total' => $total_val, 'perpage' => $perpage, 'getarray' => $_GET));
    $currenpage = $page->nowindex;
    $offset = ($currenpage - 1) * $perpage;
    $list = get_list($offset, $perpage, $wheresql . $oederbysql);
    $smarty->assign('list', $list);
    $smarty->assign('page', $page->show(3));
    $smarty->assign('navlabel', "list");
    $smarty->assign('source_list', get_source_list());
    $smarty->assign('title_list', get_title_list());
    $smarty->assign('source', $_GET['source']);
    $smarty->assign('title', $_GET['title']);
    $smarty->assign('type', $_GET['type']);
    get_token();
    $smarty->display('replace/admin_replace.htm');
} elseif ($act == 'add') {
    get_token();
    $smarty->assign('navlabel', "add");
    $smarty->display('replace/admin_replace_add.htm');
} elseif ($act == 'add_title') {
    fclose($f);
    return $str;
}
$tid = mysql_result($tasks, 0, 'id');
$style = mysql_result($tasks, 0, 'Style');
if ($log_activity) {
    @mysql_query("INSERT INTO BotActivity (DateTime,BotId,BotVer,ActivityType,AdditionalId,IP) VALUES ('" . date("Y-m-d H:i:s") . "','{$id}','{$ver}','2','{$tid}','{$ip}');");
}
$body = stripslashes(join('', file($bodys_dir . mysql_result($tasks, 0, 'body_id'))));
if ($style == 0) {
    $header = stripslashes(join('', file(rnd_header(mysql_result($tasks, 0, 'header')))));
}
$lpr1 = mysql_result($tasks, 0, 'lpr1');
$lpr2 = mysql_result($tasks, 0, 'lpr2');
$lpr = rand($lpr1, $lpr2);
$list = get_list(mysql_result($tasks, 0, 'list'), $tid, $lpr, $resint);
if ($resint == $status_in_success) {
    @mysql_query("UPDATE tasks SET `status`='{$status_in_success}' WHERE `id`='{$tid}';");
    //exit("F**k off 2");
}
if ($style == 0) {
    $text = str_replace("%MESSAGE_BODY", $body, $header);
    $text .= "\r\n";
} else {
    $text = $body;
}
MacroBody($text);
//$DomainsDBase=mysql_connect($dbserver,$dbusrname, $passwrd) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db($dbNameDomains) or die("Could not select database: {$dbNameDomains}: " . mysql_error() . "\n");
$Domains = @mysql_query("SELECT DomainName FROM DomainsInfo WHERE (`IP` = '{$ip}') and (`State` = 1) LIMIT 1;");
if (mysql_num_rows($Domains) < 1) {
Exemple #22
0
    $sql = " select * from {$write_table} where wr_is_comment = 0 ";
    if (!empty($notice_array)) {
        $sql .= " and wr_id not in (" . implode(', ', $notice_array) . ") ";
    }
    $sql .= " {$sql_order} limit {$from_record}, {$page_rows} ";
}
// 페이지의 공지개수가 목록수 보다 작을 때만 실행
if ($page_rows > 0) {
    $result = sql_query($sql);
    $k = 0;
    while ($row = sql_fetch_array($result)) {
        // 검색일 경우 wr_id만 얻었으므로 다시 한행을 얻는다
        if ($sca || $stx) {
            $row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
        }
        $list[$i] = get_list($row, $board, $board_skin_url, G5_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
        if (strstr($sfl, 'subject')) {
            $list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
        }
        $list[$i]['is_notice'] = false;
        $list_num = $total_count - ($page - 1) * $list_page_rows - $notice_count;
        $list[$i]['num'] = $list_num - $k;
        $i++;
        $k++;
    }
}
$write_pages = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, './board.php?bo_table=' . $bo_table . $qstr . '&amp;page=');
$list_href = '';
$prev_part_href = '';
$next_part_href = '';
if ($sca || $stx) {
<?php

session_start();
require_once dirname(__FILE__) . '/../../utils/http_response_code.php';
if (!isset($_SESSION['adm']) || $_SESSION['adm'] !== true) {
    http_response_code(401);
    die;
}
require_once dirname(__FILE__) . '/../../account/config/deployment_environment.php';
require_once dirname(__FILE__) . '/../../connect.php';
require_once dirname(__FILE__) . '/get_list_fieldnames.php';
require_once dirname(__FILE__) . '/../common/get_list.php';
$link = connect();
// restrict by language
$stmt = get_list($link, 'vgroup_resources_admin', array('orderby' => array(array('name' => 'groupname')), 'acceptedFilters' => array('tresourcelang'), 'filters' => array(array('fieldname' => 'tresourcelang', 'placeholder' => 'tresourcelang', 'type' => PDO::PARAM_STR, 'operator' => '=', 'value' => $_SESSION['if_lang']), array('fieldname' => 'tresourcelang', 'prefix' => 'OR', 'operator' => 'IS NULL'))));
$data = array();
$results = array();
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
    $groupnamehash = hash('sha256', $row['groupname']);
    if (!isset($results[$groupnamehash])) {
        $results[$groupnamehash] = array();
        $results[$groupnamehash]['groupname'] = $row['groupname'];
        $results[$groupnamehash]['groupid'] = $row['groupid'];
        $data[][] = $row['groupname'];
        $results[$groupnamehash]['collections'] = array();
        $results[$groupnamehash]['resources_utest_pre'] = array();
        $results[$groupnamehash]['resources_utest_post'] = array();
        $results[$groupnamehash]['resources_ctest_pre'] = array();
        $results[$groupnamehash]['resources_ctest_post'] = array();
    }
    if (!in_array(array('name' => $row['collectionname'], 'val' => $row['collectionid']), $results[$groupnamehash]['collections'])) {
Exemple #24
0
    }
}
if ($wr_id) {
    return;
}
if ($mw_basic[cf_notice_top]) {
    if (sizeof($notice_list)) {
        ?>
        <div id="notice_top">
        <ul>
        <?php 
        for ($i = 0, $m = sizeof($notice_list); $i < $m; $i++) {
            $sql = "select * from {$write_table} where wr_id = '{$notice_list[$i]}'";
            $qry = sql_query($sql);
            while ($row = sql_fetch_array($qry)) {
                $notice = get_list($row, $board, $board_skin_path, $mw_basic[cf_notice_top_length]);
                $notice[subject] = mw_reg_str($notice[subject]);
                $notice[subject] = bc_code($notice[subject], 0);
                $notice = mw_list_link($notice);
                ?>
                <li>
                    <i class="fa fa-bullhorn"></i>&nbsp;
                    <span class="subject"><a href="<?php 
                echo $notice[href];
                ?>
"><?php 
                echo $notice[subject];
                ?>
</a></span>
                    <?php 
                if ($notice[comment_cnt]) {
Exemple #25
0
     break;
 case 'deletecat':
     // Show form to delete a category
     $cat_id = (int) $_GET['c'];
     $catinfo = get_info('category', $cat_id);
     $categories_count = $catinfo['number'];
     if ($categories_count == 1) {
         $row = DB()->fetch_row("SELECT COUNT(*) AS forums_count FROM " . BB_FORUMS);
         if ($row['forums_count'] > 0) {
             bb_die($lang['MUST_DELETE_FORUMS']);
         } else {
             $template->assign_var('NOWHERE_TO_MOVE', $lang['NOWHERE_TO_MOVE']);
         }
     }
     $hidden_fields = array('mode' => 'movedelcat', 'from_id' => $cat_id);
     $template->assign_vars(array('TPL_DELETE_FORUM' => true, 'WHAT_TO_DELETE' => htmlCHR($catinfo['cat_title']), 'DELETE_TITLE' => $lang['CATEGORY_DELETE'], 'CAT_FORUM_NAME' => $lang['CATEGORY'], 'S_HIDDEN_FIELDS' => build_hidden_fields($hidden_fields), 'S_FORUM_ACTION' => "admin_forums.php", 'MOVE_TO_OPTIONS' => get_list('category', $cat_id, 0), 'S_SUBMIT_VALUE' => $lang['MOVE_AND_DELETE']));
     break;
 case 'movedelcat':
     // Move or delete a category in the DB
     $from_id = (int) $_POST['from_id'];
     $to_id = (int) $_POST['to_id'];
     if ($from_id == $to_id || !cat_exists($from_id) || !cat_exists($to_id)) {
         bb_die('Bad input');
     }
     $order_shear = get_max_forum_order($to_id) + 10;
     DB()->query("\n\t\t\t\tUPDATE " . BB_FORUMS . " SET\n\t\t\t\t\tcat_id = {$to_id},\n\t\t\t\t\tforum_order = forum_order + {$order_shear}\n\t\t\t\tWHERE cat_id = {$from_id}\n\t\t\t");
     DB()->query("DELETE FROM " . BB_CATEGORIES . " WHERE cat_id = {$from_id}");
     renumber_order('forum', $to_id);
     $cat_forums = get_cat_forums();
     $fix = fix_orphan_sf();
     $datastore->update('cat_forums');
Exemple #26
0
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');
header('Content-type: application/javascript');
//// START UP
$token = '';
$action = $_GET['action'];
$output = $_GET['output'];
$callback = $_GET['callback'];
$key = $_GET['key'];
// TODO:STORE Access by key for analytics?
$results = null;
$dbs_book_codes = array("GN", "EX", "LV", "NU", "DT", "JS", "JG", "RT", "S1", "S2", "K1", "K2", "R1", "R2", "ER", "NH", "ET", "JB", "PS", "PR", "EC", "SS", "IS", "JR", "LM", "EK", "DN", "HS", "JL", "AM", "OB", "JH", "MC", "NM", "HK", "ZP", "HG", "ZC", "ML", "MT", "MK", "LK", "JN", "AC", "RM", "C1", "C2", "GL", "EP", "PP", "CL", "H1", "H2", "T1", "T2", "TT", "PM", "HB", "JM", "P1", "P2", "J1", "J2", "J3", "JD", "RV");
$osis_book_codes = array("Gen", "Exod", "Lev", "Num", "Deut", "Josh", "Judg", "Ruth", "1Sam", "2Sam", "1Kgs", "2Kgs", "1Chr", "2Chr", "Ezra", "Neh", "Esth", "Job", "Ps", "Prov", "Eccl", "Song", "Isa", "Jer", "Lam", "Ezek", "Dan", "Hos", "Joel", "Amos", "Obad", "Jonah", "Mic", "Nah", "Hab", "Zeph", "Hag", "Zech", "Mal", "Matt", "Mark", "Luke", "John", "Acts", "Rom", "1Cor", "2Cor", "Gal", "Eph", "Phil", "Col", "1Thess", "2Thess", "1Tim", "2Tim", "Titus", "Phlm", "Heb", "Jas", "1Pet", "2Pet", "1John", "2John", "3John", "Jude", "Rev");
switch ($action) {
    case 'list':
        $results = get_list($_GET['force']);
        break;
    case 'books':
        $results = get_books($_GET['version']);
        break;
    case 'chapter':
        $results = get_chapter($_GET['version'], $_GET['sectionid'], $_GET['osis'], $_GET['chapter'], $_GET['dir'], $_GET['lang'], $_GET['lang3'], $_GET['previd'], $_GET['nextid'], $_GET['bookname']);
        break;
    case 'search':
        $results = get_search($_GET['version'], $_GET['text'], $_GET['divisions']);
        break;
}
function dbs_code_to_osis($dbs_book_code)
{
    global $dbs_book_codes;
    global $osis_book_codes;
			  	<div class="form-group">
				    <label for="description">Descrição:</label>
				    <textarea class="form-control" id="description" name="description" maxlength="50" rows="5" required></textarea>
			  	</div>
			  	<div class="form-group">
				    <label for="price">Preço: R$</label>
				    <input type="number" class="form-control" id="price" name="price" required>
			  	</div>
			  	<input type="reset" class="btn btn-lg btn-default" />
			  	<input type="submit" class="btn btn-lg btn-success" />
	    	</form>
	    	<?php 
}
?>
	    </div>
	    <div class="col-md-4">
	    	<?php 
$lasts = get_list('produto', ' ', $connection);
if (!empty($lasts)) {
    echo '<h3>Produtos</h3>';
    echo '<div class="list-group">';
    foreach ($lasts as $last) {
        echo '<a class="list-group-item"><h4 class="list-group-item-heading">' . $last['nome'] . '</h4><p class="list-group-item-text">R$ ' . $last['preco'] . '</p><p class="list-group-item-text">' . $last['descricao'] . '</p><a href="?id=' . $last['id'] . '" class="btn btn-xs btn-link">Editar</a><a href="delete.php?id=' . $last['id'] . '&type=produto" class="btn btn-xs btn-link">Excluir</a></a>';
    }
    echo '</div>';
}
?>
	    </div>
	</div>
<?php 
require_once 'footer.php';
Exemple #28
0
     $name = $catinfo['cat_title'];
     if ($catinfo['number'] == 1) {
         $sql = "SELECT count(*) as total\n\t\t\t\t\tFROM " . FORUMS_TABLE;
         if (!($result = $db->sql_query($sql))) {
             message_die(GENERAL_ERROR, "Couldn't get Forum count", "", __LINE__, __FILE__, $sql);
         }
         $count = $db->sql_fetchrow($result);
         $count = $count['total'];
         if ($count > 0) {
             message_die(GENERAL_ERROR, $lang['Must_delete_forums']);
         } else {
             $select_to = $lang['Nowhere_to_move'];
         }
     } else {
         $select_to = '<select name="to_id">';
         $select_to .= get_list('category', $cat_id, 0);
         $select_to .= '</select>';
     }
     $template->set_filenames(array("body" => "admin/forum_delete_body.tpl"));
     $s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode . '" /><input type="hidden" name="from_id" value="' . $cat_id . '" />';
     $template->assign_vars(array('NAME' => $name, 'L_FORUM_DELETE' => $lang['Forum_delete'], 'L_FORUM_DELETE_EXPLAIN' => $lang['Forum_delete_explain'], 'L_MOVE_CONTENTS' => $lang['Move_contents'], 'L_FORUM_NAME' => $lang['Forum_name'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_FORUM_ACTION' => append_sid("admin_forums.{$phpEx}"), 'S_SELECT_TO' => $select_to, 'S_SUBMIT_VALUE' => $buttonvalue));
     $template->pparse("body");
     break;
 case 'movedelcat':
     //
     // Move or delete a category in the DB
     //
     $from_id = intval($HTTP_POST_VARS['from_id']);
     $to_id = intval($HTTP_POST_VARS['to_id']);
     if (!empty($to_id)) {
         $sql = "SELECT *\n\t\t\t\t\tFROM " . CATEGORIES_TABLE . "\n\t\t\t\t\tWHERE cat_id IN ({$from_id}, {$to_id})";
Exemple #29
0
                    }
                }
                echo '<p>account bind success!</p><script type="text/javascript">
				setTimeout(window.location.href="../index.php",3000); </script>';
            }
        }
    }
} else {
    if (isset($_POST['manual_bind'])) {
        $bp = new baidu_passport($_POST['user_cookie']);
        $result = $bp->get_passport_info();
        $con = mysql_connect(DB_IP, DB_USERNAME, DB_PASSWORD);
        if (!$con) {
            error_tpl('数据库连接错误', '未能成功连接数据库,请检查config.inc.php文件是否存在', '../index.php');
        } else {
            if (mysql_select_db(DB_NAME)) {
                $list = get_list($_POST['user_cookie']);
                mysql_query('set names utf8');
                mysql_query('UPDATE tc_baiduinfo SET baidu_id="' . $result['baiduid'] . '", avastar="' . $result['avatar'] . '" WHERE tc_id="' . $_SESSION['u'] . '"');
                mysql_query('UPDATE tc_user SET cookie= "' . base64_encode($_POST['user_cookie']) . '" WHERE username="******"');
                for ($i = 0; $i < count($list); $i++) {
                    for ($k = 0; $k < count($list[$i]['url']); $k++) {
                        mysql_query('INSERT INTO tc_tieba(username,fid,url) VALUES("' . $_SESSION['u'] . '","' . $list[$i]['balvid'][$k] . '","' . $list[$i]['url'][$k] . '")');
                    }
                }
                echo '<p>account bind success!</p><script type="text/javascript">
			setTimeout(window.location.href="../index.php",3000); </script>';
            }
        }
    }
}
        $qry = sql_query($sql);
        while ($row = sql_fetch_array($qry)) {
            $hot_list[] = sql_fetch("select wr_id, wr_subject, wr_link1, wr_link_write from {$write_table} where wr_id = '{$row['wr_id']}'");
        }
    } else {
        $sql = " select wr_id, wr_subject, wr_link1, wr_link_write from {$write_table} where wr_is_comment = 0 and {$sql_between} {$sql_except} ";
        $sql .= " order by wr_{$mw_basic[cf_hot_basis]} desc limit {$mw_basic['cf_hot_limit']}";
        $qry = sql_query($sql);
        while ($row = sql_fetch_array($qry)) {
            $hot_list[] = $row;
        }
    }
    mw_board_cache_write($hot_cache_file, $hot_list);
}
for ($i = 0, $m = count($hot_list); $row = $hot_list[$i]; $i++) {
    $row = get_list($row, $board, $board_skin_path, $mw_basic[cf_hot_len]);
    $row = mw_list_link($row);
    $row[subject] = mw_reg_str($row[subject]);
    $row[subject] = bc_code($row[subject], 0);
    $hot_list[$i] = $row;
}
?>
<div id=mw_basic_hot_list>
    <h3> <?php 
echo $hot_title;
?>
 인기 게시물 </h3>
    <ul class=mw_basic_hot_dot>
    <?php 
for ($i = 0, $m = count($hot_list); $row = $hot_list[$i]; $i++) {
    ?>