本文整理汇总了PHP中Contacts::showContactsTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::showContactsTable方法的具体用法?PHP Contacts::showContactsTable怎么用?PHP Contacts::showContactsTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::showContactsTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Address
break;
//when user request to edit particular organization
//when user request to edit particular organization
case "view":
if ($o->fetchBPartner($o->bpartner_id)) {
$o->orgctrl = $ctrl->selectionOrg($o->createdby, $o->organization_id, 'N', "", 'Y');
$o->viewBpartnerInfo();
$tokenadd = $s->createToken($tokenlife, "CREATE_ADD");
$tokencontacts = $s->createToken($tokenlife, "CREATE_CONTACTS");
include_once "class/Address.php.inc";
include_once "class/Contacts.php.inc";
$add = new Address();
$contacts = new Contacts();
$add->showAddressTable($o->bpartner_id, "WHERE ad.bpartner_id={$o->bpartner_id}", "ORDER BY ad.defaultlevel,ad.address_name", $tokenadd);
echo "<BR>";
$contacts->showContactsTable($o->bpartner_id, "WHERE c.bpartner_id={$o->bpartner_id}", "ORDER BY c.defaultlevel,c.contacts_name", $tokencontacts);
} else {
//if can't find particular organization from database, return error message
redirect_header("bpartner.php", 3, "Some error on viewing your bpartner data, probably database corrupted");
}
break;
case "edit":
if ($o->fetchBPartner($o->bpartner_id)) {
// if($o->bpartnergroup_id > 0){
// $account_type = $o->getAccountType($o->bpartnergroup_id);
// $whereaccount = " and account_type = $account_type ";
// }else
// $whereaccount = "";
//create a new token for editing a form
$token = $s->createToken($tokenlife, "CREATE_BPARTNER");
$o->orgctrl = $ctrl->selectionOrg($o->createdby, $o->organization_id, 'N', "", 'Y');
示例2:
} else {
$log->saveLog($o->contacts_id, $tablecontacts, $o->updatesql, "U", "F");
redirect_header("contacts.php?action=edit&contacts_id={$o->contacts_id}", $pausetime, "Warning! Can't save the data, please make sure all value is insert properly.");
}
break;
case "delete":
if ($s->check(true, $token, "CREATE_CONTACTS")) {
if ($o->deleteContacts($o->contacts_id)) {
$log->saveLog($o->contacts_id, $tablecontacts, $o->updatesql, "D", "O");
redirect_header("bpartner.php?action=view&bpartner_id={$o->bpartner_id}", $pausetime, "Data removed successfully.");
} else {
$log->saveLog($o->contacts_id, $tablecontacts, $o->updatesql, "D", "F");
redirect_header("contacts.php?action=edit&contacts_id={$o->contacts_id}", $pausetime, "Warning! Can't delete data from database.");
}
} else {
$log->saveLog($o->contacts_id, $tablecontacts, $o->updatesql, "D", "F");
redirect_header("contacts.php?action=edit&contacts_id={$o->contacts_id}", $pausetime, "Warning! Can't delete data from database.");
}
default:
$token = $s->createToken($tokenlife, "CREATE_CONTACTS");
$o->orgctrl = $ctrl->selectionOrg($o->createdby, $defaultorganization_id, 'N', "", 'Y');
$o->sellaccountsctrl = $ctrl->getSelectAccounts($o->defaultsellaccount_id, 'Y', "", "defaultsellaccount_id", "AND placeholder=0");
$o->buyaccountsctrl = $ctrl->getSelectAccounts($o->defaultbuyaccount_id, 'Y', "", "defaultbuyaccount_id", "AND placeholder=0");
$o->issueaccountsctrl = $ctrl->getSelectAccounts($o->defaultissueaccount_id, 'Y', "", "defaultissueaccount_id", "AND placeholder=0");
$o->stockadjustaccountsctrl = $ctrl->getSelectAccounts($o->defaultstockadjustaccount_id, 'Y', "", "defaultstockadjustaccount_id", "AND placeholder=0");
$o->getInputForm("new", 0, $token);
$o->showContactsTable("WHERE contacts_id>0 and organization_id={$defaultorganization_id}", "ORDER BY defaultlevel,contacts_name");
break;
}
echo '</td>';
require XOOPS_ROOT_PATH . '/footer.php';