<?php require_once '../util.php'; require_once '../db_helper.php'; $books = getAllBooks(getDBInstance()); $smarty = getSmartyInstance(); $smarty->assign('books',$books); $smarty->display('admin/books.html'); ?>
<?php require_once 'util.php'; $id = $_REQUEST['id']; $db = getDBInstance(); $book = $db->get_row("select * from books where id=$id"); // $db->debug(); $smarty = getSmartyInstance(); $smarty->assign('book',$book); $smarty->display('book.html'); ?>
<?php header('Access-Control-Allow-Origin: *'); require_once "require.php"; // html 에서 넘어온 oper 라는 파라메터 $oper = $_GET['oper']; $db_instance = getDBInstance(); // product list if ($oper == "product") { $query = "SELECT pd.imagename, at.path, at.attachmentsid, pd.product_no\n\tFROM vtiger_crmentity ce, vtiger_products pd, vtiger_seattachmentsrel sa, vtiger_attachments at\n\tWHERE ce.deleted =0\n\tAND ce.crmid = pd.productid\n\tAND pd.productid = sa.crmid\n\tAND sa.attachmentsid = at.attachmentsid"; $query_result = query($db_instance, $query, true); echo json_encode($query_result); } else { if ($oper == "productDetail") { $productno = $_GET['productno']; $query = "select distinct product_no, productname, unit_price, weight, pack_size, sales_start_date, sales_end_date\n\tfrom vtiger_products\n\twhere product_no = '{$productno}'"; $query_result = query($db_instance, $query, true); echo json_encode($query_result); } else { if ($oper == "acoount") { $query = "select accountid, accountname, phone, email1 from vtiger_account"; $query_result = query($db_instance, $query, true); echo json_encode($query_result); } else { if ($oper == "accountDetail") { $orgno = $_GET['orgno']; $query = "select distinct ac.accountid, ac.accountname, ac.phone, ac.email1, ab.bill_street, ab.bill_city, ab.bill_state, ab.bill_country, ab.bill_pobox\n\tfrom vtiger_account ac, vtiger_accountbillads ab\n\twhere ac.accountid = ab.accountaddressid\n\tand ac.accountid = '{$orgno}'"; $query_result = query($db_instance, $query, true); echo json_encode($query_result); } else { if ($oper == "accountEdit") {
<?php require_once '../util.php'; require_once '../db_helper.php'; $users = getAllUsers(getDBInstance()); $smarty = getSmartyInstance(); $smarty->assign('users',$users); $smarty->display('admin/users.html'); ?>