/** * 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; }
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); }
/** * 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; }
/** * 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; }
/** * 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; }
//]]> </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?'); ?>
</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>
/** * 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); } } }
/** * 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; }
$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>
<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"); ?>
$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");
$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; }
$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');
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); } }
function eventAjaxEditTaskFormRHS(EventControler $event_controler) { $form = '<div class="taskbox1a"><div class="taskbox1b"><div class="taskbox1c">'; $this->getId($event_controler->id); $this->sessionPersistent("TaskEdit", "index.php", 120); $e_task = new Event("TaskEdit->eventUpdate"); $e_task->setLevel(1999); $e_task->setDomId('form' . $event_controler->id); $e_task->setSecure(false); $e_task->addEventAction("TaskEdit->eventSetDateInFormat", 1487); $form .= $e_task->getFormHeader(); $form .= $e_task->getFormEvent(); $is_sp_date_set = $_SESSION['TaskEdit']->is_sp_date_set; $_SESSION['TaskEdit']->setRegistry("task"); $_SESSION['TaskEdit']->setApplyRegistry(true, "Form"); $_SESSION['TaskEdit']->fields->addField(new strFBFieldTypeText("task_description")); $_SESSION['TaskEdit']->fields->task_description->css_form_style = "width:100%;"; $form .= $_SESSION['TaskEdit']->task_description . '<br /><br />'; $_SESSION['TaskEdit']->due_date = $this->convertDateToString($this->getDateFormatForTask($event_controler->id)); if ($is_sp_date_set == "Yes") { $form .= '<span class="text8">' . _('When\'s it due? (Specific Date) (YYYY/mm/dd)') . '<br />'; $_SESSION['TaskEdit']->fields->addField(new strFBFieldTypeDateSQL("due_date_dateformat")); $_SESSION['TaskEdit']->fields->due_date_dateformat->datesql = "Y/m/d::"; $form .= $_SESSION['TaskEdit']->due_date_dateformat . '</span><br /><br />'; $form .= '<input type="hidden" name="sp_date_selected" id="sp_date_selected" value="Yes">'; } else { $form .= '<span class="text8" id="when_pop_up">' . _('When\'s it due?') . '</span><br />'; $form .= $_SESSION['TaskEdit']->due_date . '<br /><br />'; $form .= '<input type="hidden" name="sp_date_selected" id="sp_date_selected" value="">'; } $form .= '<span class="text8">' . _('Choose a category') . '</span><br />'; //$form .= $_SESSION['TaskEdit']->category . '<br /><br />'; $form .= $_SESSION['TaskEdit']->task_category . '<br /><br />'; $form .= $e_task->getFormFooter(_("Save this task")); $form .= '<div class="cancellink">or <a href="#" onclick="fnCancelEdit(' . $event_controler->id . ');">' . _('cancel') . '</a></div>'; $form .= '</div></div></div>'; $event_controler->addOutputValue($form); }
?> </div> </div> <div class="left_menu"> <div class="left_menu_content"> <div><?php echo _('Search for Co-Workers by first or last name:'); ?> </div> <?php if (!is_object($_SESSION['do_User_search'])) { $do_User_search = new User(); $do_User_search->sessionPersistent("do_User_search", "logout.php", 36000); } $e_search = new Event("do_User_search->eventSetSearchByName"); $e_search->setLevel(20); $e_search->addParam("goto", "co_worker_search.php"); echo $e_search->getFormHeader(); echo $e_search->getFormEvent(); ?> <div class="marginform"> <input type="Text" name = "search_txt" id = "search_txt" value = "<?php echo $_SESSION['do_User_search']->user_search_txt; ?> "> </div> <div class="dottedline"></div> <div class="section20"> <input type="submit" value="Search" /> </div> </form><!-- Need the </form> -->
?> <span class="import_head3"><?php echo _('Map your CSV fields with Database Fields.'); ?> </span></div> <?php $csv_file = $_SESSION['csv_file']; $target_path = 'files/' . $csv_file; $do_contact = new Contact($GLOBALS['conx']); $fields_arr = $do_contact->getDbFieldNames(); $combo_box = "<option value=''>----Select----</option>"; foreach ($fields_arr as $key => $val) { $combo_box .= "<option value='{$val}'>" . $key . "</option>"; } $upload_csv = new Event("ContactImport->eventImportContactsFromCsv"); $upload_csv->setLevel(20); if ($_SESSION["page_from"] == 'reg') { //If importing while registration $upload_csv->addParam("goto", "import_contacts.php"); } else { $upload_csv->addParam("goto", "contact_import.php"); } $upload_csv->addParam("targetpath", $target_path); $upload_csv->addParam("iduser", $_SESSION['do_User']->iduser); //$upload_csv->addEventAction("ContactView->eventRebuildContactUserTable", 30); //$upload_csv->setGotFile(true); $upload_csv->setSecure(true); echo $upload_csv->getFormHeader(); echo $upload_csv->getFormEvent(); ?> <table class="import_table">
// if ($_GET['message']) { ?> <?php //} ?> <div class="text"> <div class="section20"> <?php echo _('If you are a new Ofuz user, please enter your email address below:'); ?> <br /> <?php $loginFormEmail_fb = new User(); $loginFormEmail_fb->sessionPersistent("do_User_login_email", "logout.php", 36000); $e_new_fb_reg = new Event("do_User_login_email->eventRegNewFbUser"); $e_new_fb_reg->setLevel(20); $e_new_fb_reg->addParam("fbuid", $_SESSION['do_ofuz_fb']->fb_uid); $e_new_fb_reg->addParam("fname", $fname); $e_new_fb_reg->addParam("lname", $lname); $e_new_fb_reg->addParam("comp", $company); $e_new_fb_reg->addParam("position", $position); $e_new_fb_reg->addParam("errPage", "fb_ofuz_login_verification.php"); echo $e_new_fb_reg->getFormHeader(); echo $e_new_fb_reg->getFormEvent(); echo _('Your email address: ') . '<input type="Text" name = "emailid" id = "emailid" class="formfield" ><br />'; echo '<div align="right"><input type="submit" value="' . _('Continue') . '" /></div>'; //echo '<div class="section20">'; //echo '<div class="dottedline"></div>'; echo '</form>'; echo '</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 enter your email address below:'); ?> <br /><br /> <?php $loginFormEmail_tw = new User(); $loginFormEmail_tw->sessionPersistent('do_User_login_email', 'logout.php', 36000); $e_new_tw_reg = new Event('do_User_login_email->eventRegNewTwUser'); $e_new_tw_reg->setLevel(20); $e_new_tw_reg->addParam('tw_user_id', $_SESSION['TWITTER_REGISTER']['tw_user_id']); $e_new_tw_reg->addParam('tw_screen_name', $_SESSION['TWITTER_REGISTER']['tw_screen_name']); $e_new_tw_reg->addParam('tw_token', $_SESSION['TWITTER_REGISTER']['tw_token']); $e_new_tw_reg->addParam('firstname', $_SESSION['TWITTER_REGISTER']['firstname']); $e_new_tw_reg->addParam('lastname', $_SESSION['TWITTER_REGISTER']['lastname']); $e_new_tw_reg->addParam('errPage', 'tw_user_register.php'); echo $e_new_tw_reg->getFormHeader(); echo $e_new_tw_reg->getFormEvent(); echo _('Your email address: ') . '<input type="Text" name="emailid" id="emailid" class="formfield" /><br />'; echo '<div align="right"><input type="submit" value="' . _('Continue') . '" /></div>'; echo '</form>'; echo '</div>'; ?> </div> <div class="dottedline"></div>
echo $e_inv_paypal->getFormEvent(); $e_del_paypal = new Event("UserSettings->eventDelPayPalDetail"); $e_del_paypal->setLevel(25); $e_del_paypal->addParam("id_paypal_business", $inv_paypal_email["iduser_settings"]); $e_del_paypal->addParam("goto", $_SERVER['PHP_SELF']); echo '<b>' . _('Paypal details') . '</b> ' . $e_del_paypal->getLink(_('delete')) . '<br />'; echo _('Paypal Business Email :') . '<br /> <input type = "text" name = "paypal_b_email" id="paypal_b_email" value ="' . $inv_paypal_email["setting_value"] . '" size="40"><br />'; echo '</td>'; echo '<td width="10%" style="text-align:left;">'; echo $e_inv_paypal->getFormFooter(_('Save')); echo '</td></tr></table>'; } else { $e_inv_paypal = new Event("UserSettings->eventAddPaypalDetail"); $e_inv_paypal->setLevel(20); $e_inv_paypal->addParam("goto", $_SERVER['PHP_SELF']); echo '<table width="50%" height="75px"><tr><td width="40%">'; echo $e_inv_paypal->getFormHeader(); echo $e_inv_paypal->getFormEvent(); echo '<b>' . _('Paypal details') . '</b><br />'; echo _('Paypal Business Email :') . '<br /> <input type = "text" name = "paypal_b_email" id="paypal_b_email" value ="" size="32"><br />'; echo '</td>'; echo '<td width="10%" style="text-align:left;">'; echo $e_inv_paypal->getFormFooter(_('Save')); echo '</td></tr></table>'; } ?> </div> </div>
echo '<option value = "' . $category['category'] . '" ' . $_SESSION['do_list_project_task']->getCategoryFilter($category['category']) . '>' . $category['category'] . '</option>'; } } echo '</select>'; echo '</form>'; ?> </div> <div id="project_ctlbar" style="display: none;"> <?php // Create a new persistent object do_project_edit and do the edit operation $do_project_edit = new Project(); $do_project_edit->sessionPersistent("do_project_edit", "index.php", OFUZ_TTL); $_SESSION['do_project_edit']->getId((int) $idproject); //$e_ProjectEdit = new Event('Project->eventUpdateProject'); $e_ProjectEdit = new Event('do_project_edit->eventUpdateProject'); $e_ProjectEdit->setLevel(1999); $e_ProjectEdit->addEventAction('mydb.gotoPage', 2000); $e_ProjectEdit->addParam('goto', 'Project/' . $idproject); echo $e_ProjectEdit->getFormHeader(); echo $e_ProjectEdit->getFormEvent(); $_SESSION['do_project_edit']->setFields("project"); $_SESSION['do_project_edit']->setApplyRegistry(true, "Form"); ?> <!--Project name: <input type="text" name="name" value="<?php echo $project_details['name']; ?> " style="width:400px;" /><br /><br /> Effort estimated in hours : <input type="text" name="effort_estimated_hrs" value="<?php echo $project_details['effort_estimated_hrs']; ?> " style="width:40px;" /><br /><br />-->
$broom = '<img style="vertical-align:middle;" src="/images/broom.png" border="0" title="Clear Search" />'; echo $e_clear_search->getLink($broom); ?> <input type="submit" value="<?php echo _('Search'); ?> "></div> <div class="suggestionsBox" id="suggestions" style="display: none;"></div> <div class="suggestionList" id="autoSuggestionsList"></div> </form> <!-- <span class="text8">or <span class="bluelink"><a href="#" onclick="return false;">search by city, state, country, zip, phone, or email</a></span></span>--> <?php // code to create the filter event $e_filter = new Event("do_Contacts->eventSetFilter"); $e_filter->setLevel(501); $e_filter->addParam("goto", "contacts.php"); ?> <form id="setFilter" name="setFilter" method="post" action="eventcontroler.php"> <?php echo $e_filter->getFormEvent(); ?> <h3><?php echo _('View contacts:'); ?> <select id="filter" name="filter" onchange='$("#setFilter").submit();'> <option value=""></option> <option value="add"<?php echo $_SESSION['do_Contacts']->getFilter("add"); ?> ><?php
echo '<div class="messages_unauthorized">'; echo htmlentities($_SESSION['in_page_message']); $_SESSION['in_page_message'] = ''; echo '</div></div><br /><br />'; } else { $msg = new Message(); $msg->getMessage("Account Cacel"); echo '<div class="percent95">', $msg->displayMessage(), '</div>'; } //$f_user = new User(); //$f_user->getId($_SESSION['do_User']->iduser); //$f_user->form(); $CancelAccount = new OfuzCancelAccount(); //$CancelAccount->setRegistry('ofuz_cancel_account') $e_cancel_account = new Event("OfuzCancelAccount->eventCancelAccount"); $e_cancel_account->setLevel(20); $e_cancel_account->addEventAction("do_User->eventLogout", 50); echo $e_cancel_account->getFormHeader(); echo $e_cancel_account->getFormEvent(); $CancelAccount->setFields("ofuz_cancel_account"); $CancelAccount->setApplyRegistry(true, "Form"); echo '<br />' . $CancelAccount->reason; echo '<br /><input type="submit" value="' . _('Yes Cancel and delete all my information') . '" />'; ?> </div> <div class="solidline"></div> </td></tr></table> <div class="spacerblock_40"></div> <div class="layout_footer"></div> </div> </td><td class="layout_rmargin"></td></tr></table>
<?php $thistab = _('Invoices'); include_once 'includes/ofuz_navtabs.php'; $do_breadcrumb = new Breadcrumb(); $do_breadcrumb->getBreadcrumbs(); if (!$invoice_access) { $msg = new Message(); echo '<div class="messageshadow_unauthorized">'; echo '<div class="messages_unauthorized">'; echo $msg->getMessage("unauthorized_invoice_access"); echo '</div></div><br /><br />'; exit; } // Main Invoice Form $f_invoiceForm = new Event("InvoiceEditSave->eventValuesFromForm"); $f_invoiceForm->setLevel(1999); //$f_invoiceForm->addEventAction("InvoiceEditSave->checkEmptyDueDate", 1999); $f_invoiceForm->addEventAction("InvoiceEditSave->eventUpdateInvoice", 2000); $f_invoiceForm->addEventAction("InvoiceLine->eventSaveInvoiceLine", 2200); $f_invoiceForm->addEventAction("InvoiceEditSave->eventCheckContactChanged", 2201); $f_invoiceForm->addEventAction("InvoiceEditSave->eventSetInvoiceCalculation", 2210); $f_invoiceForm->addParam("id", $_SESSION['InvoiceEditSave']->idinvoice); $f_invoiceForm->addParam("contact", $_SESSION['InvoiceEditSave']->idcontact); $f_invoiceForm->addParam("goto", "invoice.php"); echo $f_invoiceForm->getFormHeader(); echo $f_invoiceForm->getFormEvent(); $discount = $_SESSION['InvoiceEditSave']->discount; $tax = $_SESSION['InvoiceEditSave']->tax; $idcontact = $_SESSION['InvoiceEditSave']->idcontact; $due_date = $_SESSION['InvoiceEditSave']->due_date; $contact_name_comp = $do_contact->getContact_Company_ForInvoice($idcontact, $_SESSION['InvoiceEditSave']->idcompany);
$e_inv_date_format = new Event("UserSettings->eventUpdateInvDateFormat"); $e_inv_date_format->setLevel(30); $e_inv_date_format->addParam("id_inv_date_format", $inv_date_format["iduser_settings"]); $e_inv_date_format->addParam("goto", $_SERVER['PHP_SELF']); echo $e_inv_date_format->getFormHeader(); echo $e_inv_date_format->getFormEvent(); echo '<div class="in290x18">'; echo '<b>' . _('Date Format') . '</b><br />'; echo $UserSettings->listInvDateFormat($inv_date_format["setting_value"]); echo "<br>"; echo $e_inv_date_format->getFormFooter(_('Save')); echo '</div> <div class="dashedline"></div>'; } else { $e_inv_date_format = new Event("UserSettings->eventAddInvDateFormat"); $e_inv_date_format->setLevel(30); $e_inv_date_format->addParam("goto", $_SERVER['PHP_SELF']); echo $e_inv_date_format->getFormHeader(); echo $e_inv_date_format->getFormEvent(); echo '<div class="in290x18">'; echo '<b>' . _('Date Format') . '</b><br />'; echo $UserSettings->listInvDateFormat(); echo "<br>"; echo $e_inv_date_format->getFormFooter(_('Save')); echo '</div> <div class="dashedline"></div>'; } ?> </div> <div class="solidline"></div> </td></tr></table>
<div class="import_head2"><span class="import_head3"><?php echo _('Select your vCard File'); ?> </span></div> <div class="import_cont1"> <?php echo _('Ofuz supports importing contacts from vCard.'); echo '<br />'; echo _('To start import, browse to locate your file and click on the Import button.'); ?> </div> <?php $import_vcard = new Event("VBook->eventVCardImport"); $import_vcard->setLevel(20); $import_vcard->addParam("goto", "vcard_import.php"); if ($_SESSION["page_from"] == 'reg') { $import_vcard->addParam("fromReg", "Yes"); } else { $import_vcard->addParam("fromReg", "No"); } $import_vcard->addParam("iduser", $_SESSION['do_User']->iduser); ////$import_vcard->addEventAction("ContactView->eventRebuildContactUserTable", 30); $import_vcard->setGotFile(true); $import_vcard->setSecure(true); $htmlform = $import_vcard->getFormHeader(); $htmlform .= $import_vcard->getFormEvent(); $htmlform .= '<div class="import_cont3"><b>' . _('File Location: ') . ' </b>'; $htmlform .= '<input type="file" name="fields[contact_vcard]"></div>'; $htmlform .= '<div class="import_cont3"><b>' . _('Set Tag ') . '<input type="text" name="fields[import_tag]" value="import_vCard_' . date("Y-m-d") . '">' . _(' on the imported contacts.') . '</b></div>';
?> </span> <?php if (is_object($GLOBALS['cfg_submenu_placement']['task'])) { echo $GLOBALS['cfg_submenu_placement']['task']->getMenu(); } ?> </div> <div id="ptask_ctlbar" style="display: none;"> <?php $do_project_list = new Project(); $do_project_list->getAllProjects(); $SelectOptions = $do_project_list->getProjectsSelectOptions($_SESSION['do_project_task']->idproject); $e_ProjectTask = new Event('ProjectTask->eventUpdateProjectTask'); $e_ProjectTask->setLevel(1999); $e_ProjectTask->addEventAction('WorkFeedProjectTask->eventAddFeed', 2002); $e_ProjectTask->addEventAction('mydb.gotoPage', 2010); $e_ProjectTask->addParam('goto', 'Task/' . $idproject_task); $e_ProjectTask->addParam('task_event_type', 'update_task'); echo $e_ProjectTask->getFormHeader(); echo $e_ProjectTask->getFormEvent(); $do_project_list->idproject = $_SESSION['do_project_task']->idproject; $task_category_arr = $do_project_list->getDistinctTaskCategoryForProjectUnionUser(); ?> Task name: <input type="text" name="task_description" value="<?php echo htmlentities($_SESSION['do_project_task']->task_description); ?> " style="width:400px;" /><br /><br /> Project: <select name="idproject"><?php echo $SelectOptions;