本文整理汇总了PHP中person::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP person::delete方法的具体用法?PHP person::delete怎么用?PHP person::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类person
的用法示例。
在下文中一共展示了person::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
$emergencyPerson->insertamum = date('Y-m-d H:i:s');
if (!$emergencyPerson->save()) {
echo $emergencyPerson->errormsg;
die($p->t('global/fehleraufgetreten'));
}
// in preincoming speichern
$preincoming->person_id_emergency = $emergencyPerson->person_id;
$preincoming->updateamum = date('Y-m-d H:i:s');
} else {
if ($_REQUEST['emergency_name_id'] != "" && $_REQUEST['emergency_nachname'] == "" && $_REQUEST['emergency_vorname'] == "") {
// löscht die Person
$preincoming->person_id_emergency = "";
if (!$preincoming->save()) {
die($p->t('global/fehleraufgetreten'));
}
if (!$emergencyPerson->delete($_REQUEST['emergency_name_id'])) {
echo $emergencyPerson->errormsg;
die($p->t('global/fehleraufgetreten'));
}
} else {
if ($_REQUEST['emergency_name_id'] != "") {
// Person updaten
$emergencyPerson->load($_REQUEST['emergency_name_id']);
$emergencyPerson->vorname = $_REQUEST['emergency_vorname'];
$emergencyPerson->nachname = $_REQUEST['emergency_nachname'];
$emergencyPerson->updateamum = date('Y-m-d H:i:s');
$emergencyPerson->new = false;
if (!$emergencyPerson->save()) {
echo $emergencyPerson->errormsg;
die($p->t('global/fehleraufgetreten'));
}
示例2: urldecode
require 'path.php';
init_cobalt('Delete person');
if (isset($_GET['person_id'])) {
$person_id = urldecode($_GET['person_id']);
require 'form_data_person.php';
}
if (xsrf_guard()) {
init_var($_POST['btn_cancel']);
init_var($_POST['btn_delete']);
require 'components/query_string_standard.php';
if ($_POST['btn_cancel']) {
log_action('Pressed cancel button');
redirect("listview_person.php?{$query_string}");
} elseif ($_POST['btn_delete']) {
log_action('Pressed delete button');
require 'subclasses/person.php';
$dbh_person = new person();
$object_name = 'dbh_person';
require 'components/create_form_data.php';
$dbh_person->delete($arr_form_data);
redirect("listview_person.php?{$query_string}");
}
}
require 'subclasses/person_html.php';
$html = new person_html();
$html->draw_header('Delete Person', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('person_id');
$html->detail_view = TRUE;
$html->draw_controls('delete');
$html->draw_footer();
示例3: rtrim
if (!$person->get_id() && $max_alloc_users && get_num_alloc_users() >= $max_alloc_users && $_POST["personActive"]) {
alloc_error(get_max_alloc_users_message());
}
if (!$TPL["message"]) {
$person->set_value("availability", rtrim($person->get_value("availability")));
$person->set_value("areasOfInterest", rtrim($person->get_value("areasOfInterest")));
$person->set_value("comments", rtrim($person->get_value("comments")));
$person->set_value("emergencyContact", rtrim($person->get_value("emergencyContact")));
$person->set_value("managementComments", rtrim($person->get_value("managementComments")));
$person->currency = config::get_config_item('currency');
$person->save();
alloc_redirect($TPL["url_alloc_personList"]);
}
} else {
if ($_POST["delete"]) {
$person->delete();
alloc_redirect($TPL["url_alloc_personList"]);
}
}
#$person = new person();
#$person->set_id($personID);
#$person->select();
$person->set_values("person_");
if ($person->get_id()) {
$q = prepare("SELECT tfPerson.tfID AS value, tf.tfName AS label \n FROM tf, tfPerson \n \t\t\t\t WHERE tf.tfID = tfPerson.tfID \n AND tfPerson.personID = %d \n AND (tf.tfActive = 1 OR tf.tfID = %d)", $person->get_id(), $person->get_value("preferred_tfID"));
$TPL["preferred_tfID_options"] = page::select_options($q, $person->get_value("preferred_tfID"));
$tf = new tf();
$tf->set_id($person->get_value("preferred_tfID"));
$tf->select();
}
$TPL["absence_url"] = $TPL["url_alloc_absence"] . "personID=" . $personID;