当前位置: 首页>>代码示例>>PHP>>正文


PHP Societe::create_from_member方法代码示例

本文整理汇总了PHP中Societe::create_from_member方法的典型用法代码示例。如果您正苦于以下问题:PHP Societe::create_from_member方法的具体用法?PHP Societe::create_from_member怎么用?PHP Societe::create_from_member使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Societe的用法示例。


在下文中一共展示了Societe::create_from_member方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GETPOST

if ($rowid) {
    $caneditfieldmember = $user->rights->adherent->creer;
}
// PDF
$hidedetails = GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
$hidedesc = GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
$hideref = GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
/*
 * 	Actions
 */
// Create third party from a member
if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) {
    if ($result > 0) {
        // Creation user
        $company = new Societe($db);
        $result = $company->create_from_member($object, $_POST["companyname"]);
        if ($result < 0) {
            $langs->load("errors");
            $errmsg = $langs->trans($company->error);
            setEventMessages($company->error, $company->errors, 'errors');
        } else {
            $action = 'addsubscription';
        }
    } else {
        $errmsg = $object->error;
    }
}
if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer)) {
    $error = 0;
    if (empty($user->rights->user->user->creer)) {
        if ($_POST["userid"] != $user->id && $_POST["userid"] != $object->user_id) {
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:card_subscriptions.php

示例2: User

         $nuser = new User($db);
         $result = $nuser->create_from_member($object, GETPOST('login'));
         if ($result < 0) {
             $langs->load("errors");
             setEventMessages($langs->trans($nuser->error), null, 'errors');
         }
     } else {
         setEventMessages($object->errors, $object->error, 'errors');
     }
 }
 // Create third party from a member
 if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) {
     if ($result > 0) {
         // Creation user
         $company = new Societe($db);
         $result = $company->create_from_member($object, GETPOST('companyname'));
         if ($result < 0) {
             $langs->load("errors");
             setEventMessages($langs->trans($company->error), null, 'errors');
             setEventMessages($company->error, $company->errors, 'errors');
         }
     } else {
         setEventMessages($object->error, $object->errors, 'errors');
     }
 }
 if ($action == 'confirm_sendinfo' && $confirm == 'yes') {
     if ($object->email) {
         $from = $conf->email_from;
         if (!empty($conf->global->ADHERENT_MAIL_FROM)) {
             $from = $conf->global->ADHERENT_MAIL_FROM;
         }
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:card.php


注:本文中的Societe::create_from_member方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。