當前位置: 首頁>>代碼示例>>PHP>>正文


PHP company::add方法代碼示例

本文整理匯總了PHP中company::add方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::add方法的具體用法?PHP company::add怎麽用?PHP company::add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在company的用法示例。


在下文中一共展示了company::add方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

       }*/
    $template->assign("allcust", $allcust);
    $template->display("admincustomers.tpl");
} elseif ($action == "addcust") {
    if (!$userpermissions["admin"]["add"]) {
        $errtxt = $langfile["nopermission"];
        $noperm = $langfile["accessdenied"];
        $template->assign("errortext", "{$errtxt}<br>{$noperm}");
        $template->display("error.tpl");
        die;
    }
    if (!$end) {
        $end = 0;
    }
    $data = array('company' => getArrayVal($_POST, "company"), 'contact' => getArrayVal($_POST, "contact"), 'email' => getArrayVal($_POST, "email"), 'phone' => getArrayVal($_POST, "tel1"), 'mobile' => getArrayVal($_POST, "tel2"), 'url' => getArrayVal($_POST, "web"), 'address' => getArrayVal($_POST, "address"), 'zip' => getArrayVal($_POST, "zip"), 'city' => getArrayVal($_POST, "city"), 'country' => getArrayVal($_POST, "country"), 'state' => getArrayVal($_POST, "state"), 'desc' => getArrayVal($_POST, "desc"));
    $add = $companyObj->add($data);
    if ($add) {
        header("Location: admin.php?action=customers&mode=added");
    }
} elseif ($action == "assigncustomer") {
} elseif ($action == "system") {
    $classes = array("overview" => "overview", "system" => "active", "users" => "users");
    $languages_fin = array();
    foreach ($languages as $lang) {
        $fin = countLanguageStrings($lang);
        if (!empty($langfile[$lang])) {
            $lang2 = $langfile[$lang];
            $lang2 .= " (" . $fin . "%)";
            $fin = array("val" => $lang, "str" => $lang2);
        } else {
            $lang2 = $lang . " (" . $fin . "%)";
開發者ID:veganaize,項目名稱:Collabtive,代碼行數:31,代碼來源:admin.php

示例2: company

    require 'components/query_string_standard.php';
    require 'subclasses/company.php';
    $dbh_company = new company();
    $object_name = 'dbh_company';
    require 'components/create_form_data.php';
    extract($arr_form_data);
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_company.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button', $_SERVER['PHP_SELF']);
        $message .= $dbh_company->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_company->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_company->add($arr_form_data);
            redirect("listview_company.php?{$query_string}");
        }
    }
}
require 'subclasses/company_html.php';
$html = new company_html();
$html->draw_header('Add Company', $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();
開發者ID:seans888,項目名稱:APC-CPO,代碼行數:31,代碼來源:add_company.php


注:本文中的company::add方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。