コード例 #1
0
ファイル: postservice1.php プロジェクト: sknlim/classified-2
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/common.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/service.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/user.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/config.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/image.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/photo.class.php";
$objuser = new user();
$objuser->checkLoginAjax();
$referrer = $_SERVER['HTTP_REFERER'];
if (strtoupper($_SESSION['foongigs_usertype']) == "SEEKER") {
    echo "script: messageBox('Sorry!, Only PROVIDER can post Service ');";
    exit;
}
if (is_array($_POST)) {
    $pid = "";
    if (isset($_SESSION['photofilename'])) {
        $photo = new photo();
        $commonObj = new common();
        $size[0] = $commonObj->getConfigValue("imagesize1");
        $size[1] = $commonObj->getConfigValue("imagesize2");
        $size[2] = $commonObj->getConfigValue("imagesize3");
        $photo->createPhotos($size, $_SESSION['photofilename']);
        $pid = $photo->insertimage();
    }
    $objservice = new service();
    $serviceid = $objservice->add($_POST);
    if ($pid != "") {
        $objservice->addimages($serviceid, $pid);
    }
    echo "script: messageBox('Service Posted',function() { window.location='account.php'; }); ";
}
コード例 #2
0
ファイル: add_service.php プロジェクト: seans888/Bgy-Project
    require 'components/query_string_standard.php';
    require 'subclasses/service.php';
    $dbh_service = new service();
    $object_name = 'dbh_service';
    require 'components/create_form_data.php';
    extract($arr_form_data);
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button');
        redirect("listview_service.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button');
        $message .= $dbh_service->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_service->check_uniqueness($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
        }
        if ($message == "") {
            $dbh_service->add($arr_form_data);
            redirect("listview_service.php?{$query_string}");
        }
    }
}
require 'subclasses/service_html.php';
$html = new service_html();
$html->draw_header('Add Service', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_controls('add');
$html->draw_footer();
コード例 #3
0
ファイル: addservice.php プロジェクト: yunsite/demila
<?php

// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['add']);
$cms = new service();
if (isset($_POST['add'])) {
    $status = $cms->add();
    if ($status !== true) {
        abr('error', $status);
    } else {
        refresh("?m=" . $_GET['m'] . "&c=service", $langArray['add_complete']);
    }
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';