本文整理汇总了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 . "%)";
示例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();