本文整理汇总了PHP中Event::setLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::setLevel方法的具体用法?PHP Event::setLevel怎么用?PHP Event::setLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Event
的用法示例。
在下文中一共展示了Event::setLevel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateContactInvoiceContent
/**
* A custom method within the Plugin to generate the content
*
*/
function generateContactInvoiceContent()
{
$output = '';
if (!is_object($_SESSION['do_invoice_list'])) {
$do_invoice_list = new Invoice();
$do_invoice_list->sessionPersistent("do_invoice_list", "index.php", OFUZ_TTL);
}
if ($_SESSION['do_invoice_list']->hasInvoicesForEntity($_SESSION['do_cont']->idcontact, 'Contact')) {
$user_settings = $_SESSION['do_User']->getChildUserSettings();
if ($user_settings->getNumRows()) {
while ($user_settings->next()) {
if ($user_settings->setting_name == 'currency' && $user_settings->setting_value != '') {
$currency = explode("-", $user_settings->setting_value);
$_SESSION['do_invoice_list']->currency_iso_code = $currency[0];
$_SESSION['do_invoice_list']->currency_sign = $currency[1];
//$_SESSION['do_invoice_list']->currency = $_SESSION['do_invoice_list']->currecy_sign ;
$_SESSION['do_invoice_list']->setCurrencyDisplay();
$_SESSION['do_invoice_list']->getCurrencyPostion();
}
}
}
$e_filter_inv = new Event("do_invoice_list->eventFilterInvoice");
$e_filter_inv->addParam("type", "Contact");
$e_filter_inv->addParam("idcontact", $_SESSION['do_cont']->idcontact);
$e_filter_inv->addParam("goto", "invoices.php");
$e_filter_inv->setLevel(10);
$output .= '<table width="100%">';
$output .= $_SESSION['do_invoice_list']->getInvoiceTotals($e_filter_inv, $_SESSION['do_cont']->idcontact);
$output .= '</table>';
} else {
$this->setIsActive(false);
}
return $output;
}
示例2: eventAjaxEditTaskCategoryForm
function eventAjaxEditTaskCategoryForm(EventControler $evctl)
{
$form = '<div class="taskbox1a"><div class="taskbox1b"><div class="taskbox1c">';
$this->getId($evctl->id);
$this->sessionPersistent("TaskCategoryEdit", "index.php", 120);
$e_task = new Event("TaskCategoryEdit->eventValuesFromForm");
$e_task->setLevel(1999);
$e_task->addEventAction("TaskCategoryEdit->eventUpdate", 2000);
$form .= $e_task->getFormHeader();
$form .= $e_task->getFormEvent();
$_SESSION['TaskCategoryEdit']->setRegistry("task_category");
$_SESSION['TaskCategoryEdit']->setApplyRegistry(true, "Form");
$form .= $_SESSION['TaskCategoryEdit']->name . '<br /><br />';
$form .= $_SESSION['TaskCategoryEdit']->iduser;
$form .= $e_task->getFormFooter("Update this Category");
$form .= '<div class="cancellink">or <a href="#" onclick="fnCancelEdit(' . $evctl->id . ');">' . _('cancel') . '</a></div>';
$form .= '</div></div></div>';
$evctl->addOutputValue($form);
}
示例3: generateTaskOwnerBlock
/**
* A custom method within the Plugin to generate the content
*
* @return string : HTML form
* @see class/ProjectTask.class.php
*/
function generateTaskOwnerBlock()
{
$output = '';
$output .= '<b>' . $_SESSION['do_project_task']->getTaskOwnerName() . '</b>';
$output .= '<br /><br />';
$output .= '<a href="#" onclick="showCoWorkers();return false;">' . _('Change the task owner') . '</a>';
$output .= '<div id="task_co_worker" style="display:none;">';
$e_change_task_owner = new Event("do_project_task->eventChangeTaskOwner");
$e_change_task_owner->setLevel(100);
$e_change_task_owner->addEventAction('WorkFeedProjectTask->eventAddFeed', 140);
$e_change_task_owner->addParam('task_event_type', 'change_task_owner');
$e_change_task_owner->addParam("idtask", $_SESSION["do_project_task"]->idtask);
$e_change_task_owner->addParam("goto", "Task/" . $_SESSION['do_project_task']->idproject_task);
$output .= $e_change_task_owner->getFormHeader();
$output .= $e_change_task_owner->getFormEvent();
$output .= $_SESSION['do_project_task']->renderChangeTaskOwnerList();
$output .= '<br /><br /><a href="#" onclick="hideCoWorkers(); return false;">' . _('Hide') . '</a>';
$output .= $e_change_task_owner->getFormFooter();
$output .= '</div>';
return $output;
}
示例4: generateCoworkerSearchForm
/**
* A custom method within the Plugin to generate the content
*
* @return string : HTML form
* @see class/UserRelations.class.php
*/
function generateCoworkerSearchForm()
{
$output = '<div>' . _('Search for Co-Workers by first or last name:') . '</div>';
if (!is_object($_SESSION['do_User_search'])) {
$do_User_search = new User();
$do_User_search->sessionPersistent("do_User_search", "logout.php", OFUZ_TTL);
}
$e_search = new Event("do_User_search->eventSetSearchByName");
$e_search->setLevel(500);
$e_search->addParam("goto", "co_worker_search.php");
$output .= $e_search->getFormHeader();
$output .= $e_search->getFormEvent();
$output .= '<div class="marginform">
<input type="Text" name="search_txt" id="search_txt" value="">
</div>
<div class="dottedline"></div>
<div class="section20">
<input type="submit" value="Search" />
</div>
</div></form>';
return $output;
}
示例5: generateInvoicesYTDBlock
/**
* A custom method within the Plugin to generate the content
*
* @return string : HTML
* @see class/Invoice.class.php
*/
function generateInvoicesYTDBlock()
{
$output = '';
$output .= '<div class="spacerblock_20"></div>';
$quote_ytd_total = $_SESSION['do_invoice_list']->getTotalQuotesYTD();
$invoice_ytd_total = $_SESSION['do_invoice_list']->getTotalInvoiceYTD();
$invoice_sent = $_SESSION['do_invoice_list']->getTotalSentYTD();
$paid_ytd_total = $_SESSION['do_invoice_list']->getTotalPaidYTD();
$pastdue_ytd_total = $_SESSION['do_invoice_list']->getTotalPastDueYTD();
$e_filter_inv = new Event("do_invoice_list->eventFilterInvoice");
$e_filter_inv->addParam("type", "User");
$e_filter_inv->addParam("goto", "invoices.php");
$e_filter_inv->setLevel(10);
$output .= '<table width="100%">';
if ($quote_ytd_total) {
$e_filter_inv->addParam("status", "Quote");
$output .= '<tr><td style="text-align:left;">Quotes:</td><td style="text-align:right;">' . $e_filter_inv->getLink($_SESSION['do_invoice_list']->viewAmount($quote_ytd_total)) . '</td></tr>';
}
if ($invoice_ytd_total) {
$e_filter_inv->addParam("status", "Invoiced");
$output .= '<tr><td style="text-align:left;">Invoiced:</td><td style="text-align:right;">' . $e_filter_inv->getLink($_SESSION['do_invoice_list']->viewAmount($invoice_ytd_total)) . '</td></tr>';
}
if ($invoice_sent) {
$e_filter_inv->addParam("status", "Sent");
$output .= '<tr><td style="text-align:left;">Pending Payment:</td><td style="text-align:right;">' . $e_filter_inv->getLink($_SESSION['do_invoice_list']->viewAmount($invoice_sent)) . '</td></tr>';
}
if ($paid_ytd_total) {
$e_filter_inv->addParam("status", "Paid");
$output .= '<tr><td style="text-align:left;">Paid:</td><td style="text-align:right;">' . $e_filter_inv->getLink($_SESSION['do_invoice_list']->viewAmount($paid_ytd_total)) . '</td></tr>';
}
if ($pastdue_ytd_total) {
$e_filter_inv->addParam("status", "Overdue");
$output .= '<tr><td style="text-align:left;">Past Due:</td><td style="text-align:right;">' . $e_filter_inv->getLink($_SESSION['do_invoice_list']->viewAmount($pastdue_ytd_total)) . '</td></tr>';
}
$output .= '</table>';
return $output;
}
示例6: _
//]]>
</script>
<?php
$do_feedback = new Feedback();
$do_feedback->createFeedbackBox();
?>
<table class="layout_columns"><tr><td class="layout_lmargin"></td><td>
<div class="layout_content">
<?php
$thistab = _('Invoices');
include_once 'includes/ofuz_navtabs.php';
$do_breadcrumb = new Breadcrumb();
$do_breadcrumb->getBreadcrumbs();
// Main Invoice Form
$f_invoiceForm = new Event("InvoiceEditSave->addInvoice");
$f_invoiceForm->setLevel(2000);
$f_invoiceForm->addEventAction("InvoiceLine->eventSaveInvoiceline", 2200);
$f_invoiceForm->addEventAction("InvoiceEditSave->eventSetInvoiceCalculation", 2210);
$f_invoiceForm->addParam("goto", "invoice.php");
echo $f_invoiceForm->getFormHeader();
echo $f_invoiceForm->getFormEvent();
$_SESSION['InvoiceEditSave']->setFields("invoice_add");
$_SESSION['InvoiceEditSave']->setApplyRegistry(true, "Form");
?>
<div class="grayline1"></div>
<div class="spacerblock_20"></div>
<table class="layout_columns"><tr><td class="layout_lcolumn">
<div class="left_menu_header">
<div class="left_menu_header_content"><?php
echo _('Recurrent Invoice?');
?>
示例7: _
</div>
</div>
<div class="loginbg2">
<?php
$loginForm_tw = new User();
$loginForm_tw->sessionPersistent('do_User_login', 'logout.php', 36000);
?>
<div class="text">
<div class="section20">
<?php
echo _('If you are a new Ofuz user, please continue with your Google account information to create a new account:');
?>
<br /><br />
<?php
$e_google_user_reg = new Event("User->eventRegGoogleUser");
$e_google_user_reg->setLevel(20);
$e_google_user_reg->addParam("google_openid_identity", $_SESSION["google"]["openid_identity"]);
$e_google_user_reg->addParam("err_page", $_SERVER["PHP_SELF"]);
echo $e_google_user_reg->getFormHeader();
echo $e_google_user_reg->getFormEvent();
?>
<table>
<tr>
<td class="tdformlabel"><?php
echo _('First Name: ');
?>
</td>
<td class="tabletdformfield"><input type="Text" name="firstname" id="firstname" class="formfield" value="<?php
echo $_SESSION["google"]["firstname"];
?>
" /></td>
示例8: eventAjaxGetEditForm
/**
* Generate the Ajax Edit form
* @param $evtcl -- Object
*/
function eventAjaxGetEditForm(EventControler $evtcl)
{
$_SESSION['ProjectDiscussEditSave']->setApplyRegistry(false, "Form");
$html = '';
$curdiv = $evtcl->curdiv;
$this->getId($evtcl->id);
$user_checked = '';
$user_coworker_checked = '';
if ($this->discuss_edit_access == '') {
$user_checked = 'checked';
}
if ($this->discuss_edit_access == 'user') {
$user_checked = 'checked';
}
if ($this->discuss_edit_access == 'user coworker') {
$user_coworker_checked = 'checked';
}
$note_val = $this->discuss;
$e_edit = new Event("ProjectDiscussEditSave->eventUpdate");
$e_edit->setLevel(110);
$e_edit->addEventAction("mydb.gotoPage", 111);
$e_edit->addEventAction('ProjectDiscussEditSave->eventHTMLCleanUp', 109);
$e_edit->setGotFile(true);
if ($this->iduser == $_SESSION['do_User']->iduser) {
$html .= $e_edit->getFormHeader();
$html .= $e_edit->getFormEvent();
$_SESSION['ProjectDiscussEditSave']->setRegistry("ofuz_add_project_discuss");
$_SESSION['ProjectDiscussEditSave']->setApplyRegistry(true, "Form");
$html .= '<br />' . _('Note :') . '<br /><textarea id="note_edit" name="fields[discuss]" rows="3" cols="100" class="dojo_textarea">' . $note_val . '</textarea><br />';
$html .= '<div id="edit_note_more" style="text-align:left;"><a href="#" onclick ="fnEditNoteMoreOpts();return false;">' . _('More Options') . '</a></div>';
$html .= '<div id="edit_note_more_opts" style="display: none;"> ';
$html .= _('Hours Worked : ') . $_SESSION['ProjectDiscussEditSave']->hours_work . '<br />';
$html .= _('File : ') . $_SESSION['ProjectDiscussEditSave']->document . '<br />';
$html .= _('Who can edit ? ') . '<input type="radio" name="fields[discuss_edit_access]" value="user" ' . $user_checked . '>' . _('Just me') . ' ';
$html .= '<input type="radio" name="fields[discuss_edit_access]" value="user coworker" ' . $user_coworker_checked . '>' . _('My Co-Workers and I') . ' ';
$html .= '</div>';
$html .= '<div style="text-align:right">';
$html .= '<input type="submit" name="Save" value="' . _('Save') . '"> <a href="javascript:;" onclick="fnCancelEdit(\'' . $curdiv . '\',' . $evtcl->id . ');return false;">' . _('close') . '</a>';
$html .= '</div>';
$html .= '</form>';
$evtcl->addOutputValue($html);
} else {
if ($this->discuss_edit_access == 'user coworker') {
$html .= $e_edit->getFormHeader();
$html .= $e_edit->getFormEvent();
$_SESSION['ProjectDiscussEditSave']->setRegistry("ofuz_add_project_discuss");
$_SESSION['ProjectDiscussEditSave']->setApplyRegistry(true, "Form");
$html .= '<br />' . _('Note :') . '<br /><textarea id="note_edit" name="fields[discuss]" rows="3" cols="100" class="dojo_textarea">' . $note_val . '</textarea><br />';
$html .= '<div style="text-align:right">';
$html .= '<input type="submit" name="Save" value="' . _('Save') . '"> <a href="javascript:;" onclick="fnCancelEdit(\'' . $curdiv . '\',' . $evtcl->id . ');return false;">' . _('close') . '</a>';
$html .= '</div>';
$html .= '</form>';
$evtcl->addOutputValue($html);
} else {
$msg = new Message();
$msg->getMessage("unauthorized_note_edit");
$html .= $msg->content . '<br /><br />';
$html .= '<a href="#" onclick = "fnCancelEdit(\'' . $curdiv . '\',' . $evtcl->id . ');return false;">' . _('close') . '</a>';
$evtcl->addOutputValue($html);
}
}
}
示例9: generatePaymentLogDetails
/**
* A custom method within the Plugin to generate the content
*
*/
function generatePaymentLogDetails()
{
$output = '';
$do_company = new Company();
$output .= '<div class="center_elem center_text">';
$button_payment = new DynamicButton();
$output .= $button_payment->CreateButton('#', 'receive payment', '', 'addPayment();return false;', 'dyn_button_receive_payment', 'width:138px;margin:0 auto;');
$output .= '</div><div class="spacerblock_20"></div>' . "\n";
if ($_SESSION['extra_amt'] != '') {
$cancel_payment = new Event("do_invoice->eventCancelMultiPayment");
$cancel_payment->setLevel(10);
$cancel_link = $cancel_payment->getLink(_('Cancel'));
$msg = '<div style="margin-left:0px;">';
$msg .= '<div class="messages_unauthorized">';
$msg .= _('Add payment ') . $_SESSION['do_invoice']->viewAmount($_SESSION['extra_amt']) . _(' with the Note: ') . '"' . $_SESSION['ref_num'] . '"' . _(' or with the amount you want.') . ' ' . $cancel_link;
$msg .= '</div></div>';
$output .= "\n" . '<div id="add_payment" style="display:block;">';
$output .= $msg;
} else {
/*$do_payment_invoice = new PaymentInvoice();
if($do_payment_invoice->getExtraAmoutNotPaid() !== false ){
$msg = '<div style="margin-left:0px;">';
$msg .= '<div class="messages_unauthorized">';
$msg .= _('You have some extra amount not yet applied to invoices, do you want to apply them now ? ');
$e_apply_extra_amt = new Event("do_invoice->eventSetApplyExtraAmount");
$apply_link = $e_apply_extra_amt->getLink(_('apply'));
$msg .='<br />'.$apply_link;
$msg .='</div></div>';
$output .= $msg ;
$output .= "\n".'<div id="add_payment" style="display:block;">';
}else{
$output .= "\n".'<div id="add_payment" style="display:none;">';
}*/
$output .= "\n" . '<div id="add_payment" style="display:none;">';
}
$e_add_pay = new Event("do_invoice->eventAddPayment");
$e_add_pay->setLevel(20);
$e_add_pay->addParam("goto", $_SERVER['PHP_SELF']);
$e_add_pay->addParam('id', $_SESSION['do_invoice']->idinvoice);
$output .= $e_add_pay->getFormHeader();
$output .= $e_add_pay->getFormEvent();
if ($_SESSION['extra_amt'] != '') {
$output .= _('Amount :') . ' <br /><input type="Text" name="payment_amt" id="payment_amt" value="' . $_SESSION['extra_amt'] . '"><br />';
} else {
$output .= _('Amount :') . ' <br /><input type="Text" name="payment_amt" id="payment_amt" value="' . $_SESSION['do_invoice']->amt_due . '"><br />';
$output .= _('Note :') . ' <br /><input type="Text" name="payment_ref_num" id="payment_ref_num" value=""><br />';
}
$output .= '<input type="submit" name="psubmit" value="' . _('Add Payment') . '">';
$output .= '</form>';
$output .= ' <br /><a href="#" onclick="hidePayment();return false;">' . _('No, I\'ll add later') . '</a><br /><br />';
$output .= "\n" . '</div>';
$do_inv_payment_log = new PaymentLog();
$do_inv_payment_log->getPaymentLog($_SESSION['do_invoice']->idinvoice);
while ($do_inv_payment_log->next()) {
$count = 0;
$e_del_log = new Event("PaymentLog->eventDeletePaymentLog");
$e_del_log->addParam("goto", $_SERVER['PHP_SELF']);
$e_del_log->addParam("id", $do_inv_payment_log->idpaymentlog);
$e_del_log->addParam("amt", $do_inv_payment_log->amount);
$output .= "\n" . '<div id="templt' . $count . '" class="co_worker_item co_worker_desc">';
$output .= "\n" . '<div style="position: relative;">';
$output .= "\n" . '<span class="text12"><span class="text_lightblue">' . $do_inv_payment_log->ref_num . '</span> <span class="sep1">|</span> <b>' . $_SESSION['do_invoice']->viewAmount($do_inv_payment_log->amount) . '</b><br />' . '<b>' . (isset($_SESSION['do_invoice']->idcompany) ? $do_company->getCompanyName($_SESSION['do_invoice']->idcompany) : $do_contact->getContactName($_SESSION['do_invoice']->idcontact)) . '</b><br />' . '<span class="text_darkgray">Received: ' . date('F j, Y', $do_inv_payment_log->timestamp) . '</span></span>';
$img_del = '<img class="delete_icon_tag" border="0" width="14px" height="14px" src="/images/delete.gif">';
$output .= "\n" . '<div width="15px" id="trashcan' . $count . '" class="deletenote" style="right:0;">' . $e_del_log->getLink($img_del, ' title="' . _('Remove') . '"') . '</div>';
$output .= "\n" . '</div></div>';
$output .= "\n" . '<div class="invoiceline12"></div>';
$count++;
}
$output .= "\n" . '</div>';
return $output;
}
示例10: _
$e_filter_exp = new Event("do_expense_list->eventSetFilter");
$e_filter_exp->setLevel(10);
echo ' ';
$e_filter_exp->addParam("type", "date");
$e_filter_exp->addParam("goto", $_PHP['SELF']);
echo '<form id="setFilterInvMonth" name="setFilterInvMonth" method="post" action="/eventcontroler.php" style="display:inline;">';
echo $e_filter_inv->getFormEvent();
echo $_SESSION['do_invoice_list']->getYearDropDownFilter();
echo ' ';
echo $_SESSION['do_invoice_list']->getMonthDropDownFilter();
echo '</form>';
?>
<?php
} else {
$e_filter_inv = new Event("do_invoice_list->eventUnsetFilter");
$e_filter_inv->setLevel(10);
$e_filter_inv->addParam("goto", $_SERVER['PHP_SELF']);
echo $e_filter_inv->getLink(_("View all invoices"));
echo ' ';
}
?>
</div>
<table class="invoice_list">
<tr>
<th class="invoice_list_12pct center_text"><?php
echo _('Expense #');
?>
</th>
示例11: Contact
<div class="mobile_head_pad5">
<h1>Edit Contact</h1>
</div>
</div>
<div class="mobile_head_pad5">
<?php
if (!is_object($_SESSION['ContactEditSave'])) {
$ContactEdit = new Contact($GLOBALS['conx']);
$ContactEdit->sessionPersistent("ContactEditSave", "index.php", 120);
}
if (isset($_GET['id'])) {
$_SESSION['ContactEditSave']->getId((int) $_GET['id']);
}
$e_fullContact = new Event("ContactEditSave->eventValuesFromForm");
$e_fullContact->setLevel(1999);
$e_fullContact->addEventAction("ContactEditSave->update", 2000);
$e_fullContact->addEventAction("ContactPhone->eventSavePhones", 2001);
$e_fullContact->addEventAction("ContactEmail->eventSaveEmails", 2002);
$e_fullContact->addEventAction("ContactInstantMessage->eventSaveIM", 2003);
$e_fullContact->addEventAction("ContactAddress->eventSaveContactAddress", 2004);
$e_fullContact->addEventAction("ContactWebsite->eventSaveWebsites", 2005);
$e_fullContact->addEventAction("ContactRssFeed->eventSaveRssFeed", 2006);
$e_fullContact->addEventAction("mydb.gotoPage", 2333);
$e_fullContact->addParam("goto", "i_contact.php");
echo $e_fullContact->getFormHeader();
echo $e_fullContact->getFormEvent();
$_SESSION['ContactEditSave']->setRegistry("i_ofuz_add_contact");
$_SESSION['ContactEditSave']->setApplyRegistry(true, "Form");
?>
示例12: Task
$background_image = "none";
include_once "config.php";
include_once "includes/header.inc.php";
include_once "pb_globaldivs.sys.php";
?>
<DIV id="DRAG_script_Script" style="top:46px;left:237px;height:267px;width:451px;position:absolute;visibility:visible;z-index:5;">
<!--META metainfo="execorder:30;filename:includes/blank_script.script.inc.php;" --><?php
$do_task = new Task($GLOBALS['conx']);
$do_task->getTaskAddForm();
echo '<br><br><br> Following is just the edit example for the task id 1 <br><br>';
$TaskEdit = new Task($GLOBALS['conx']);
$TaskEdit->getId(1);
$TaskEdit->sessionPersistent("TaskEdit", "index.php", 120);
// $TaskEdit->newUpdateForm("TaskEdit");
$e_task = new Event("TaskEdit->eventValuesFromForm");
$e_task->setLevel(1999);
$e_task->addEventAction("TaskEdit->eventSetDateInFormat", 20);
$e_task->addEventAction("TaskEdit->update", 2000);
echo $e_task->getFormHeader();
echo $e_task->getFormEvent();
$_SESSION['TaskEdit']->setRegistry("task");
$_SESSION['TaskEdit']->setApplyRegistry(true, "Form");
echo $_SESSION['TaskEdit']->task_description;
echo '<br><br>';
$_SESSION['TaskEdit']->due_date = $TaskEdit->convertDateToString($TaskEdit->getDateFormatForTask(1));
echo $_SESSION['TaskEdit']->due_date;
echo '<br><br>';
echo $_SESSION['TaskEdit']->category;
echo '<br><br>';
echo $_SESSION['TaskEdit']->iduser;
echo $e_task->getFormFooter("Update");
示例13: htmlentities
$do_breadcrumb->getBreadcrumbs();
?>
<div class="grayline1"></div>
<div class="spacerblock_20"></div>
<div class="contentfull">
<?php
if ($_GET['message']) {
?>
<div class="error_message"><?php
echo htmlentities(stripslashes($_GET['message']));
?>
</div><?php
}
$e_reg = new Event("UserPlan->eventUpgrade");
$e_reg->setLevel(20);
include_once "class/OfuzApiClientBase.class.php";
include_once "class/OfuzApiClient.class.php";
$api_call = new OfuzApiClient(OFUZ_API_KEY, "json");
$api_call->setObject(true);
$api_call->firstname = $_SESSION['do_User']->firstname;
$api_call->lastname = $_SESSION['do_User']->lastname;
$api_call->email = $_SESSION['do_User']->email;
//$idcontact = json_decode($api_call->get_contact_id());
if ($api_call->get_contact_id()) {
$response = $api_call->getResponse();
//print_r($response);
$idcontact = $response[1][0]->idcontact;
} else {
$api_call->getResponse()->msg;
}
示例14: Event
$msg .= '<div class="messages_unauthorized">';
$msg .= _('Add payment ') . $_SESSION['do_invoice']->viewAmount($_SESSION['extra_amt']) . _(' with the Note: ') . '"' . $_SESSION['ref_num'] . '"' . _(' or with the amount you want.') . ' ' . $cancel_link;
$msg .= '</div></div>';
?>
<div id="add_payment" style="display:block;">
<?php
} else {
?>
<div id="add_payment" style="display:none;">
<?php
}
?>
<?php
echo $msg;
$e_add_pay = new Event("do_invoice->eventAddPayment");
$e_add_pay->setLevel(20);
$e_add_pay->addParam("goto", $_SERVER['PHP_SELF']);
$e_add_pay->addParam('id', $_SESSION['do_invoice']->idinvoice);
echo $e_add_pay->getFormHeader();
echo $e_add_pay->getFormEvent();
if ($_SESSION['extra_amt'] != '') {
echo _('Amount :') . ' <br /><input type="Text" name="payment_amt" id="payment_amt" value="' . $_SESSION['extra_amt'] . '"><br />';
} else {
echo _('Amount :') . ' <br /><input type="Text" name="payment_amt" id="payment_amt" value="0.00"><br />';
echo _('Note :') . ' <br /><input type="Text" name="payment_ref_num" id="payment_ref_num" value=""><br />';
}
echo '<input type="submit" name="psubmit" value="' . _('Add Payment') . '">';
echo '</form>';
?>
<br /><a href="#" onclick="hidePayment();return false;"><?php
echo _('No, I\'ll add later');
示例15: eventAjaxGetEditForm
function eventAjaxGetEditForm(EventControler $evtcl)
{
$Parsedown = new Parsedown();
$_SESSION['ContactNoteEditSave']->setApplyRegistry(false, "Form");
$html = '';
$curdiv = $evtcl->curdiv;
$this->getId($evtcl->idnote);
$vis_user = $this->note_visibility == 'user' ? 'checked' : '';
$vis_user_cw = $this->note_visibility == 'user coworker' ? 'checked' : '';
$vis_user_cont = $this->note_visibility == 'user contact' ? 'checked' : '';
$vis_user_cw_cont = $this->note_visibility == 'user coworker contact' ? 'checked' : '';
$do_cont = new Contact();
$contact_fullname = $do_cont->getContactName($evtcl->idcontact);
if ($this->iduser == $_SESSION['do_User']->iduser) {
$note_val = $this->note;
$e_edit = new Event("ContactNoteEditSave->eventUpdate");
$e_edit->setLevel(110);
$e_edit->addEventAction("mydb.gotoPage", 111);
$e_edit->addEventAction("ContactNoteEditSave->eventHTMLCleanUp", 109);
$e_edit->setGotFile(true);
$html .= $e_edit->getFormHeader();
$html .= $e_edit->getFormEvent();
$_SESSION['ContactNoteEditSave']->setRegistry("ofuz_add_contact_note");
$_SESSION['ContactNoteEditSave']->setApplyRegistry(true, "Form");
$html .= '<br />' . _('Note :') . '<br /><textarea id="note_edit" name = "fields[note]" rows="3" cols="110">' . $Parsedown->text($note_val) . '</textarea><br />';
$html .= '<div width="100%">';
$html .= '<div id="edit_note_more" style="position:relative;float:left;text-align:left;width:50%"><a href="#" onclick ="fnEditNoteMoreOpts();return false;">' . _('More Options') . '</a></div>';
$html .= '<div style="position:relative;float:left;text-align:left;width:50%"><a href="javascript:;" onclick="showProjectList();">' . _('Attached to a project') . '</a>';
$html .= '<div id="cp_prj_list" style="position:relative;display:none;">';
$do_prjs = new Project();
$do_prjs->getAllProjects("open");
$num_prjs = $do_prjs->getNumRows();
$html .= '<select name="cpy_prjs" id="cpy_prjs" onchange="populateTasks();">';
if ($num_prjs > 0) {
$html .= '<option value="">' . _('Select Project') . '</option>';
} else {
$html .= '<option value="">' . _('You do not have Project.') . '</option>';
}
while ($do_prjs->next()) {
$html .= '<option value="' . $do_prjs->getData("idproject") . '">' . $do_prjs->getData("name") . '</option>';
}
$html .= '</select>';
$html .= '</div>';
$html .= '<div id="cp_prj_tasks"></div>';
$html .= '</div></div>';
$html .= '<div class="div_right" id="edit_note_more_opts" style="display: none;"> ';
$html .= 'File : ' . $_SESSION['ContactNoteEditSave']->document . '<br /><br />';
$html .= '</div>';
$html .= '<div id="edit_note_more_opts_vis" style="text-align: left; width: 50%;display: none;"> ';
$html .= _('Who can view this note:') . '<br />';
$html .= '<input type="radio" name="fields[note_visibility]" value="user" ' . $vis_user . '> ' . _('Just me') . ' <br />';
$html .= '<input type="radio" name="fields[note_visibility]" value="user coworker" ' . $vis_user_cw . '> ' . _('My Co-Workers and I') . '<br />';
$html .= '<input type="radio" name="fields[note_visibility]" value="user contact" ' . $vis_user_cont . '> ' . $contact_fullname . _(' and I') . '<br />';
$html .= '<input type="radio" name="fields[note_visibility]" value="user coworker contact" ' . $vis_user_cw_cont . '> ' . _('Me, Co-Workers and ') . $contact_fullname;
$html .= '</div>';
$html .= '<div style="text-align:right">';
$html .= '<input type="submit" name="Save" value = "' . _('Save') . '"> <a href="#" onclick = "fnCancelEdit(\'' . $curdiv . '\',' . $evtcl->idnote . ');return false;">' . _('close') . '</a>';
$html .= '</div>';
$html .= '</form>';
$evtcl->addOutputValue($html);
} else {
$msg = new Message();
$msg->getMessage("unauthorized_note_edit");
$html .= $msg->content . '<br /><br />';
$html .= '<a href="#" onclick = "fnCancelEdit(\'' . $curdiv . '\',' . $evtcl->idnote . ');return false;">' . _('close') . '</a>';
$evtcl->addOutputValue($html);
}
}