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


PHP Contacts::showContactsTable方法代碼示例

本文整理匯總了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');
開發者ID:gauravsaxena21,項目名稱:simantz,代碼行數:31,代碼來源:bpartner.php

示例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';
開發者ID:gauravsaxena21,項目名稱:simantz,代碼行數:31,代碼來源:contacts.php


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