<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2115 $ */ require "../libraries/common.inc.php"; require "room.share.php"; uses("adzone"); $tpl_file = "ads"; $adzone = new Adzones(); $payment = $pdb->GetArray("SELECT id,title FROM {$tb_prefix}payments WHERE available=1"); if (isset($_POST['do'])) { pb_submit_check('do'); uses("order"); $order = new Orders(); $result = $adzone->read("*", intval($_POST['id'])); if (!empty($result)) { $data['member_id'] = $the_memberid; $data['cache_username'] = $memberinfo['username']; $data['subject'] = $result['name']; $data['pay_id'] = $_POST['pay_id']; $data['pay_name'] = $_POST['pay_name']; $data['total_price'] = $result['price']; $new_trade_no = $order->Add($data); if (!empty($_POST['paynow'])) { //header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'); pheader("Location:../purchase.php?do=pay&tradeno=" . $new_trade_no); exit;
/** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require "session_cp.inc.php"; require LIB_PATH . 'time.class.php'; require LIB_PATH . 'page.class.php'; require CLASS_PATH . 'xml.class.php'; uses("adzone", "ad", "attachment", "typeoption"); $tpl_file = "ad"; $attachment = new Attachment('attach'); $adzone = new Adzones(); $ads = new Adses(); $page = new Pages(); $typeoption = new Typeoption(); $conditions = array(); setvar("AdsStatus", $typeoption->get_cache_type("common_option")); setvar("Adzones", $adzone->findAll("id,name", null, null, "id desc")); if (isset($_POST['save'])) { $vals = $_POST['ad']; if (isset($_POST['id'])) { $id = intval($_POST['id']); } if (!empty($_FILES['attach']['name'])) { $aname = empty($id) ? $ads->getMaxId() + 1 : $id; $attachment->if_thumb = false; $attachment->if_thumb_large = false;
<?php /** * PHPB2B : Opensource B2B Script (http://www.phpb2b.com/) * Copyright (C) 2007-2010, Ualink. All Rights Reserved. * * Licensed under The Languages Packages Licenses. * Support : phpb2b@hotmail.com * * @version $Revision: 1393 $ */ require "../libraries/common.inc.php"; require "room.share.php"; uses("adzone"); $tpl_file = "ads"; $adzone = new Adzones(); $result = $adzone->findAll("*", null, $conditions, " id desc"); setvar("Adzones", $result); template($tpl_file);
<?php /** * [PHPB2B] Copyright (C) 2007-2099, Ualink Inc. All Rights Reserved. * The contents of this file are subject to the License; you may not use this file except in compliance with the License. * * @version $Revision: 2075 $ */ require "../libraries/common.inc.php"; require "session_cp.inc.php"; uses("adzone"); require PHPB2B_ROOT . 'libraries/page.class.php'; include CACHE_PATH . "cache_membergroup.php"; $tpl_file = "adzone"; $adzone = new Adzones(); $page = new Pages(); $conditions = null; if (isset($_GET['do'])) { $do = trim($_GET['do']); if (!empty($_GET['id'])) { $id = intval($_GET['id']); setvar("id", $id); } if ($do == "del" && !empty($id)) { //check if have ad $all_ad = $pdb->GetOne("SELECT count(id) FROM {$tb_prefix}adses WHERE adzone_id=" . $id); if ($all_ad > 0) { flash("yet_some_ads"); } else { $adzone->del($id); }