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


PHP CCompany::load方法代码示例

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


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

示例1: getContactUpdateNotify

 public function getContactUpdateNotify(w2p_Core_CAppUI $AppUI = null, CContact $contact)
 {
     $this->_AppUI = !is_null($AppUI) ? $AppUI : $this->_AppUI;
     $company = new CCompany();
     $company->load($contact->contact_company);
     $contact->company_name = $company->company_name;
     $contact->user_display_name = $this->_AppUI->user_display_name;
     $body = "Dear contact_title contact_display_name,";
     $body .= "\n\nIt was very nice to visit you";
     $body .= $contact->contact_company ? " and company_name." : ".";
     $body .= " Thank you for all the time that you spent with me.";
     $body .= "\n\nI have entered the data from your business card into my contact database so that we may keep in touch.";
     $body .= " We have implemented a system which allows you to view the information that I've recorded and give you the opportunity to correct it or add information as you see fit. Please click on this link to view what I've recorded:";
     $body .= "\n\n" . W2P_BASE_URL . "/updatecontact.php?updatekey=contact_updatekey";
     $body .= "\n\nI assure you that the information will be held in strict confidence and will not be available to anyone other than me. I realize that you may not feel comfortable filling out the entire form so please supply only what you're comfortable with.";
     $body .= "\n\nThank you. I look forward to seeing you again, soon.";
     $body .= "\n\nBest Regards,\nuser_display_name";
     return $this->templater->render($body, $contact);
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:19,代码来源:EmailManager.class.php

示例2: getCompanyDetails

 public function getCompanyDetails()
 {
     $company = new CCompany();
     $company->load((int) $this->contact_company);
     return array('company_id' => $company->company_id, 'company_name' => $company->company_name);
 }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:6,代码来源:contacts.class.php

示例3: CProject

<th><?php 
echo $AppUI->_('Status');
?>
</th>
</tr>
<?php 
//while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) {
$s = '';
foreach ($st_projects_arr as $project) {
    $line = $project[0];
    $level = $project[1];
    if ($line['project_id']) {
        $s_project = new CProject();
        $s_project->load($line['project_id']);
        $s_company = new CCompany();
        $s_company->load($s_project->project_company);
        $start_date = intval($s_project->project_start_date) ? new CDate($s_project->project_start_date) : null;
        $end_date = intval($s_project->project_end_date) ? new CDate($s_project->project_end_date) : null;
        $actual_end_date = intval($s_project->project_actual_end_date) ? new CDate($s_project->project_actual_end_date) : null;
        $style = $actual_end_date > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
        $x++;
        $row_class = $x % 2 ? 'style="background:#fff;"' : 'style="background:#f0f0f0;"';
        $row_classr = $x % 2 ? 'style="background:#fff;text-align:right;"' : 'style="background:#f0f0f0;text-align:right;"';
        $s .= '<tr><td ' . $row_class . ' align="center"><a href="./index.php?m=projects&a=addedit&project_id=' . $line['project_id'] . '"><img src="' . w2PfindImage('icons/' . ($project_id == $line['project_id'] ? 'pin' : 'pencil') . '.gif') . '" border=0 /></b></a></td>';
        $s .= '<td ' . $row_classr . ' nowrap="nowrap">' . $line['project_id'] . '</td>';
        if ($level) {
            $sd = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $level - 1) . w2PshowImage('corner-dots.gif', 16, 12) . '&nbsp;' . '<a href="./index.php?m=projects&a=view&project_id=' . $line['project_id'] . '">' . $line['project_name'] . '</a>';
        } else {
            $sd = '<a href="./index.php?m=projects&a=view&project_id=' . $line['project_id'] . '">' . $line['project_name'] . '</a>';
        }
        $s .= '<td ' . $row_class . '>' . $sd . '</td>';
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:vw_sub_projects.php

示例4: elseif

    $project->loadFull($AppUI, $project_id);
}
if (!$project && $project_id > 0) {
    $AppUI->setMsg('Project');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect();
} elseif (count($companies) < 2 && $project_id == 0) {
    $AppUI->setMsg('noCompanies', UI_MSG_ERROR, true);
    $AppUI->redirect();
}
if ($project_id == 0 && $company_id > 0) {
    $project->project_company = $company_id;
}
// add in the existing company if for some reason it is dis-allowed
if ($project_id && !array_key_exists($project->project_company, $companies)) {
    $companies[$project->project_company] = $company->load($project->project_company)->company_name;
}
// get critical tasks (criteria: task_end_date)
$criticalTasks = $project_id > 0 ? $project->getCriticalTasks() : null;
// get ProjectPriority from sysvals
$projectPriority = w2PgetSysVal('ProjectPriority');
// format dates
$df = $AppUI->getPref('SHDATEFORMAT');
$start_date = new w2p_Utilities_Date($project->project_start_date);
$end_date = intval($project->project_end_date) ? new w2p_Utilities_Date($project->project_end_date) : null;
$actual_end_date = intval($criticalTasks[0]['task_end_date']) ? new w2p_Utilities_Date($criticalTasks[0]['task_end_date']) : null;
$style = $actual_end_date > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
// setup the title block
$ttl = $project_id > 0 ? 'Edit Project' : 'New Project';
$titleBlock = new CTitleBlock($ttl, 'applet3-48.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=projects', 'projects list');
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:addedit.php

示例5: CProject

</td>
	</tr>
	</table>
<?php 
    if ($log_pdf) {
        // make the PDF file
        if ($project_id) {
            $project = new CProject();
            $project->load($project_id);
            $pname = 'Project: ' . $project->project_name;
        } else {
            $pname = 'All Companies and All Projects';
        }
        if ($company_id) {
            $company = new CCompany();
            $company->load($company_id);
            $cname = 'Company: ' . $company->company_name;
        } else {
            $cname = 'All Companies and All Projects';
        }
        if ($log_userfilter) {
            $q = new w2p_Database_Query();
            $q->addTable('contacts');
            $q->addQuery('contact_display_name');
            $q->addJoin('users', '', 'user_contact = contact_id', 'inner');
            $q->addWhere('user_id =' . (int) $log_userfilter);
            $uname = 'User: ' . $q->loadResult();
        } else {
            $uname = 'All Users';
        }
        $output = new w2p_Output_PDFRenderer();
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:tasklogs.php

示例6: getTaskTooltip

function getTaskTooltip($task_id)
{
    global $AppUI;
    if (!$task_id) {
        return '';
    }
    $df = $AppUI->getPref('SHDATEFORMAT');
    $tf = $AppUI->getPref('TIMEFORMAT');
    $task = new CTask();
    // load the record data
    $task->load($task_id);
    // load the event types
    $types = w2PgetSysVal('TaskType');
    $assignees = $task->assignees($task_id);
    $assigned = array();
    foreach ($assignees as $user) {
        $assigned[] = $user['contact_name'] . ' ' . $user['perc_assignment'] . '%';
    }
    $start_date = (int) $task->task_start_date ? new w2p_Utilities_Date($AppUI->formatTZAwareTime($task->task_start_date, '%Y-%m-%d %T')) : null;
    $end_date = (int) $task->task_end_date ? new w2p_Utilities_Date($AppUI->formatTZAwareTime($task->task_end_date, '%Y-%m-%d %T')) : null;
    // load the record data
    $project = new CProject();
    $project->load($task->task_project);
    $task_project = $project->project_name;
    $company = new CCompany();
    $company->load($project->project_company);
    $task_company = $company->company_name;
    $tt = '<table class="tool-tip">';
    $tt .= '<tr>';
    $tt .= '	<td valign="top" width="40%">';
    $tt .= '		<strong>' . $AppUI->_('Details') . '</strong>';
    $tt .= '		<table cellspacing="3" cellpadding="2" width="100%">';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Company') . '</td>';
    $tt .= '			<td>' . $task_company . '</td>';
    $tt .= '		</tr>';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Project') . '</td>';
    $tt .= '			<td>' . $task_project . '</td>';
    $tt .= '		</tr>';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Type') . '</td>';
    $tt .= '			<td>' . $AppUI->_($types[$task->task_type]) . '</td>';
    $tt .= '		</tr>	';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Progress') . '</td>';
    $tt .= '			<td>' . sprintf("%.1f%%", $task->task_percent_complete) . '</td>';
    $tt .= '		</tr>	';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Starts') . '</td>';
    $tt .= '			<td>' . ($start_date ? $start_date->format($df . ' ' . $tf) : '-') . '</td>';
    $tt .= '		</tr>';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Ends') . '</td>';
    $tt .= '			<td>' . ($end_date ? $end_date->format($df . ' ' . $tf) : '-') . '</td>';
    $tt .= '		</tr>';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label">' . $AppUI->_('Assignees') . '</td>';
    $tt .= '			<td>';
    $tt .= implode('<br />', $assigned);
    $tt .= '		</tr>';
    $tt .= '		</table>';
    $tt .= '	</td>';
    $tt .= '	<td width="60%" valign="top">';
    $tt .= '		<strong>' . $AppUI->_('Description') . '</strong>';
    $tt .= '		<table cellspacing="0" cellpadding="2" border="0" width="100%">';
    $tt .= '		<tr>';
    $tt .= '			<td class="tip-label description">';
    $tt .= '				' . $task->task_description;
    $tt .= '			</td>';
    $tt .= '		</tr>';
    $tt .= '		</table>';
    $tt .= '	</td>';
    $tt .= '</tr>';
    $tt .= '</table>';
    return $tt;
}
开发者ID:illuminate3,项目名称:web2project,代码行数:77,代码来源:cleanup_functions.php

示例7: getCompanyName

 /**
  * @deprecated
  */
 public function getCompanyName()
 {
     trigger_error("getCompanyName has been deprecated and will be removed in v4.0. Please use getCompanyDetails() instead.", E_USER_NOTICE);
     $company = new CCompany();
     $company->overrideDatabase($this->_query);
     $company->load((int) $this->contact_company);
     return $company->company_name;
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:11,代码来源:contacts.class.php

示例8: testDelete

 /**
  * Tests the delete of a company
  */
 public function testDelete()
 {
     $this->obj->bind($this->post_data);
     $result = $this->obj->store();
     $this->assertTrue($result);
     $original_id = $this->obj->company_id;
     $result = $this->obj->delete();
     $item = new CCompany();
     $item->overrideDatabase($this->mockDB);
     $this->mockDB->stageHash(array('company_name' => '', 'company_owner' => ''));
     $item->load($original_id);
     $this->assertEquals('', $item->company_name);
     $this->assertEquals('', $item->company_owner);
 }
开发者ID:illuminate3,项目名称:web2project,代码行数:17,代码来源:CCompaniesTest.php

示例9: die

<?php

if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
$company_id = (int) w2PgetParam($_GET, 'company_id', 0);
$tab = $AppUI->processIntState('CompVwTab', $_GET, 'tab', 0);
$company = new CCompany();
if (!$company->load($company_id)) {
    $AppUI->redirect(ACCESS_DENIED);
}
$canEdit = $company->canEdit();
$canDelete = $company->canDelete();
$deletable = $canDelete;
//TODO: this should be removed once the $deletable variable is removed
$contact = new CContact();
$canCreateContacts = $contact->canCreate();
// setup the title block
$titleBlock = new w2p_Theme_TitleBlock('View Company', 'icon.png', $m);
$titleBlock->addCrumb('?m=' . $m, $m . ' list');
if ($canCreateContacts) {
    $titleBlock->addButton('New contact', '?m=contacts&a=addedit&company_id=' . $company_id);
}
if ($canEdit) {
    if ($AppUI->isActiveModule('departments')) {
        $titleBlock->addButton('New department', '?m=departments&a=addedit&company_id=' . $company_id);
    }
    $titleBlock->addButton('New project', '?m=projects&a=addedit&company_id=' . $company_id);
    $titleBlock->addCrumb('?m=companies&a=addedit&company_id=' . $company_id, 'edit this company');
    if ($canDelete && $deletable) {
        $titleBlock->addCrumbDelete('delete company', $deletable, $msg);
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:view.php


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