/** * A custom method within the Plugin to generate the content * * @return string : HTML form * @see class/UserRelations.class.php */ function generateCoworkerInvitationList() { $output = ''; $_SESSION['do_coworker']->getAllRequestsSent(); if ($_SESSION['do_coworker']->getNumrows()) { $count = 0; while ($_SESSION['do_coworker']->next()) { $e_remove_invitation = new Event("do_coworker->eventRemoveInvitation"); $e_remove_invitation->addParam('id', $_SESSION['do_coworker']->iduser_relations); $e_remove_invitation->addParam("goto", $_SERVER['PHP_SELF']); $output .= '<div class="co_worker_item"><div class="co_worker_desc">'; $output .= '<div id="invite' . $count . '" class="co_worker_item co_worker_desc">'; $output .= '<div style="position: relative;">'; if ($_SESSION['do_coworker']->idcoworker) { $output .= $_SESSION['do_User']->getFullName($_SESSION['do_coworker']->idcoworker); } else { $output .= $_SESSION['do_coworker']->decrypt($_SESSION['do_coworker']->enc_email); } $img_del = '<img src="/images/delete.gif" width="14px" height="14px" alt="" />'; $output .= '<div width="15px" id="trashcan' . $count . '" class="deletenote" style="right:0;">' . $e_remove_invitation->getLink($img_del) . '</div>'; $output .= '</div></div>'; $output .= '</div></div>'; } return $output; } else { $this->setIsActive(false); } }
/** * 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 getWebFormList() { $do_userform = new WebFormUser(); $do_userform->getUsersWebForms(); $output = ''; if (isset($GLOBALS['plugin_item_value'])) { $up = '../'; } else { $up = ''; } if ($do_userform->getNumRows()) { $count = 0; while ($do_userform->next()) { $e_remove_wf = new Event("do_userform->eventDeleteWebForm"); $e_remove_wf->addParam('id', $do_userform->idwebformuser); $e_remove_wf->addParam("goto", $_SERVER['PHP_SELF']); $count++; $output .= '<div id="webform' . $count . '" class="co_worker_item co_worker_desc">'; $output .= '<div style="position: relative;">'; $output .= '<a href="' . $up . 'WebForm/' . $do_userform->idwebformuser . '">' . $do_userform->title . '</a>'; $img_del = '<img src="/images/delete.gif" width="14px" height="14px" alt="" />'; $output .= '<div width="15px" id="trashcan' . $count . '" class="deletenote" style="right:0;">' . $e_remove_wf->getLink($img_del) . '</div>'; $output .= '</div></div>'; } } else { $this->setIsActive(false); } return $output; }
function getZendBlockConent() { // echo $_GET['idprojecttask']; $do_project_task = new ProjectTask(); $idtask = $do_project_task->getTaskId($_GET['idprojecttask']); // echo $idtask; $data = $do_project_task->getProjectTaskDetailsByTaskId($idtask); //echo $data->getData('idproject'); $idproject = $data->getData('idproject'); //$idproject = $data['idproject']; //echo '-'.$idproject; $do_zend = new Zendesk(); if ($do_zend->zendeskProjectUserRelation($_SESSION['do_User']->iduser, $idproject)) { /*Ticket Block*/ $ticket = $do_zend->getZendTicketId($_SESSION['do_User']->iduser, $_GET['idprojecttask']); $ticket_id = $ticket['ticket']; if (!empty($ticket_id)) { $idzendesk_task_ticket_releation = $ticket['idzendesk_task_ticket_releation']; $output .= '<div style="position: relative;">'; $output .= '<b>Ticket ID: ' . $ticket_id . '</b>'; $e_remove_invitation = new Event("Zendesk->eventRemoveZendTicket"); $e_remove_invitation->addParam('idzendesk_task_ticket_releation', $idzendesk_task_ticket_releation); $e_remove_invitation->addParam("goto", "Task/" . $_SESSION['do_project_task']->idproject_task); $img_del = '<img src="/images/delete.gif" width="14px" height="14px" alt="" />'; $output .= '<div style="float:right;align:right;">' . $e_remove_invitation->getLink($img_del) . '</div>'; $output .= '</div><br /><br />'; } /* Ticket Block ends */ //$ticket_id = $do_zend->getZendTicketId($_SESSION['do_User']->iduser,$_GET['idprojecttask']); $output .= '<a href="#" onclick="showZBox();return false;">' . _('Add/Update Zendesk Ticket ID') . '</a>'; $output .= '<div id="task_zbox" style="display:none;">'; $e_zticket = new Event("Zendesk->eventAddZendTicket"); //$e_zticket->setLevel(160); $e_zticket->addParam("idproject", $idproject); $e_zticket->addParam("idproject_task", $_GET['idprojecttask']); $e_zticket->addParam("iduser", $_SESSION['do_User']->iduser); $e_zticket->addParam("goto", "Task/" . $_SESSION['do_project_task']->idproject_task); $output .= $e_zticket->getFormHeader(); $output .= $e_zticket->getFormEvent(); $output .= '<input type="text" name="z_ticket_id" id = "z_ticket_id" value= ' . $ticket_id . '>'; $output .= '<input value="' . _('Add Zend Ticket') . '" type="submit">'; $output .= $e_zticket->getFormFooter(); $output .= '<br /><br /><a href="#" onclick="hideZbox(); return false;">' . _('Hide') . '</a>'; $output .= '</div>'; } return $output; }
/** * A custom method within the Plugin to generate the content * * @return string : HTML */ function generateGitBranchBlock() { $output = ''; $do_user_git = new UserGitrepo(); $git_repo = $do_user_git->CheckGitProjectExist($_SESSION["do_project"]->idproject); if (is_array($git_repo)) { include_once 'plugin/Git/class/Git.class.php'; $repo_path = "plugin/Git/repos/"; //$output .= '<br />'; $e_del_gitrepo = new Event("UserGitrepo->eventSelfDelProjectGitRepo"); $e_del_gitrepo->addParam("goto", "Project/" . $_SESSION["do_project"]->idproject); $e_del_gitrepo->addParam("idgit_project", $git_repo["idgit_project"]); $output .= '<div id="templt" class="co_worker_item co_worker_desc">'; $output .= '<div style="position: relative;">'; //$output .= '<b>Repository Name : '.$git_repo['git_repo'].'<br /></b>'; $idproject_task = (int) $_GET['idprojecttask']; $repo_name = $git_repo['git_repo']; $folder = "{$repo_path}" . "{$repo_name}"; if (is_dir($folder)) { $repo = Git::open($folder); $branch_name = $repo->branchlist($idproject_task); $branch_name = split(' ', $branch_name); //echo'<pre>';print_r($branch_name);echo'</pre>'; $size = sizeof($branch_name); for ($i = 1; $i < $size; $i++) { $branch_title = split('/', $branch_name[$i]); //echo'<pre>';print_r($branch_title);echo'</pre>'; $b_size = sizeof($branch_title); $b_name = split(' ', $branch_title[$b_size - 1]); $br_name .= $b_name[0] . '<br />'; } if (!empty($br_name)) { $output .= _('Currently The Following Git branches are associated with this Task <br />'); //$output .= '<br />Branches assoicated with current task are :<br />'; $output .= '<b>' . $br_name . '</b>'; } else { $output .= _('No Git branches found which are associated with this Task <br />'); } } else { $output .= _('Invalid Respository, Missing git repository in the plugin/Git/repos/' . $repo_name . ', Please check and try again <br />'); } $output .= '</div></div>'; } else { $output .= 'No Git Repository is associated with this Project Task'; } return $output; }
/** * A custom method within the Plugin to generate the content * * @return string : HTML * @see class/UserSettings.class.php * @see class/DiscussionEmailSetting.class.php */ function generateAddTaskBlock() { $output = ''; $idproject = $_SESSION["do_project"]->idproject; if (!is_object($_SESSION['UserSettings'])) { $do_user_settings = new UserSettings(); $do_user_settings->sessionPersistent("UserSettings", "logout.php", OFUZ_TTL); } $data = $_SESSION['UserSettings']->getSettingValue("task_discussion_alert"); $global_discussion_email_on = 'Yes'; if (!$data) { $global_discussion_email_on = 'Yes'; } else { if (is_array($data)) { if ($data["setting_value"] == 'Yes') { $global_discussion_email_on = 'Yes'; } else { $global_discussion_email_on = 'No'; } } } $_SESSION['UserSettings']->global_task_discussion_alert = $global_discussion_email_on; if ($global_discussion_email_on == 'Yes') { $DiscussionEmailSetting = new DiscussionEmailSetting(); $data = $DiscussionEmailSetting->isDiscussionAlertSet($idproject, 'Project'); if ($data && is_array($data)) { $output .= _('You have turned off email alert for this project.<br /> If you want to get email alerts for this project please turn it on. <br />'); $set_email_alert_on = new Event("DiscussionEmailSetting->eventSetOnDiscussionAlert"); $set_email_alert_on->addParam("setting_level", "Project"); $set_email_alert_on->addParam("id", $data["iddiscussion_email_setting"]); $output .= '<br />'; $output .= $set_email_alert_on->getLink('Turn On'); } else { $output .= _('Your email alert for the project discussion is set on by default. You can turn off if you do not want to receive emails for this project discussion.<br />'); $set_email_alert_off = new Event("DiscussionEmailSetting->eventSetOffDiscussionAlert"); $set_email_alert_off->addParam("id", $idproject); $set_email_alert_off->addParam("setting_level", "Project"); $output .= '<br />'; $output .= $set_email_alert_off->getLink('Turn Off'); } } return $output; }
/** * A custom method within the Plugin to generate the content * * @return string : HTML */ function generateAddGitRepositoryBlock() { $output = ''; $data = array(); $do_user_git = new UserGitrepo(); $git_repo = $do_user_git->CheckGitProjectExist($_SESSION["do_project"]->idproject); if (!is_array($git_repo)) { $data = $do_user_git->GetAllGitRepositoryForUser($_SESSION["do_User"]->iduser); if ($data != '') { $output .= _('Select the repository name from the list to add a git repository for this project.'); $output .= '<br />'; $e_git_repo = new Event("UserGitrepo->eventAddProjectGitRepo"); $e_git_repo->addParam("goto", "Project/" . $_SESSION["do_project"]->idproject); $e_git_repo->addParam("idproject", $_SESSION["do_project"]->idproject); $output .= $e_git_repo->getFormHeader(); $output .= $e_git_repo->getFormEvent(); $output .= $data; $output .= $e_git_repo->getFormFooter('Add this Git Repository'); } else { $path = $_SERVER['SERVER_NAME'] . '/Setting/Git/git_repo'; $output .= _('If you want to share git project repository, add Git Repository to your Ofuz account'); $output .= '<br /><br />'; $output .= '<a href="/Setting/Git/git_repo">'; $output .= _('Add Git-Repository'); $output .= '</a>'; } } else { $output .= _('Currently The Following Git Repository is associated with this Project'); $output .= '<br /><br />'; $e_del_gitrepo = new Event("UserGitrepo->eventSelfDelProjectGitRepo"); $e_del_gitrepo->addParam("goto", "Project/" . $_SESSION["do_project"]->idproject); $e_del_gitrepo->addParam("idgit_project", $git_repo["idgit_project"]); $output .= '<div id="templt" class="co_worker_item co_worker_desc">'; $output .= '<div style="position: relative;">'; $output .= '<b>' . $git_repo['git_repo'] . '</b>'; $img_del = '<img class="delete_icon_tag" border="0" width="14px" height="14px" src="/images/delete.gif">'; $output .= '<div width="15px" id="trashcan" class="deletenote" style="right:0;">' . $e_del_gitrepo->getLink($img_del, ' title="' . _('Remove') . '"') . '</div>'; $output .= '</div></div>'; } return $output; }
/** * 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; }
/** */ public function displayRow($void = null) { $html = ''; // $html .= '<div class="ofuz_list_contact" id="cid'.$this->data->idcontact.'" onclick="fnHighlight(\''.$this->data->idcontact.'\')"><table><tr><td><input type="checkbox" name="ck[]" id="ck'.$this->data->idcontact.'" value="'.$this->data->idcontact.'" class="ofuz_list_checkbox" onclick="fnHighlight(\''.$this->data->idcontact.'\')" /></td>'; $image_name = $this->data->getContactPicture($this->data->idcontact); $exp = explode('/', $image_name); if (in_array('dbimage', $exp)) { $image_name = '/' . $exp[1] . '/thumbnail/' . $exp[2]; } $html .= '<td class="ofuz_list_contact_col1"> <img src="' . $image_name . '" width="34" alt="" /> </td>'; $html .= '<td class="ofuz_list_contact_col2"> <span class="contact_name"><a href="/Contact/' . $this->data->idcontact . '" onclick="allowHighlight=false;">' . $this->data->firstname . ' ' . $this->data->lastname . '</a></span>'; if ($this->data->idcompany != '') { $e_detail_com = new Event('mydb.gotoPage'); $e_detail_com->addParam('goto', 'company.php'); $e_detail_com->addParam('idcompany', $this->data->idcompany); $e_detail_com->addParam('tablename', 'company'); $e_detail_com->requestSave('eDetail_company', $_SERVER['PHP_SELF']); $companyURL = $e_detail_com->getUrl(); //$html .= '<div class="contact_position"><i>'.$this->data->position.'</i> '._('at').' <a href="'.$companyURL.'" onclick="allowHighlight=false;">'.$this->data->company.'</a></div>'; $position = ''; if (strlen($this->data->position) > 0) { $position = '<i>' . $this->data->position . '</i> ' . _('at') . ' '; } $html .= '<div class="contact_position">' . $position . ' <a href="' . $companyURL . '" onclick="allowHighlight=false;">' . $this->data->company . '</a></div>'; } $html .= '</td>'; $html .= '<td class="ofuz_list_contact_col3"> ' . $this->data->phone_number . '<br /> <a href="mailto:' . $this->data->email_address . '">' . $this->data->email_address . '</a><br /> <i>' . str_replace(",", ", ", $this->data->tags) . '</i> </td>'; //$html .= '</tr></table></div>'; //$html .= '<div class="spacerblock_2"></div><div class="solidline"></div><div id="'.$this->data->idcontact.'" class="message_box"></div>'; echo $html; }
function generateOnclickJS() { $script = "<script type='text/javascript'>\n function shareWithCoworker()\n {\n \n \$(\"#ContactEditSave__shareContact\").attr(\"action\",\"/share_co_workers.php\");\n \$(\"#ContactEditSave__shareContact\").submit(); \n \n }\n //set_selected();\n </script>"; echo $script; $e = new Event("ContactEditSave->shareContact"); // Fictitious Event $e->addEventAction("mydb.gotoPage", 304); $e->addParam("goto", "contacts.php"); echo $e->getFormHeader(); echo $e->getFormEvent(); $js .= '<input type="hidden" name="ck[]" value="' . $_SESSION['ContactEditSave']->idcontact . '">'; $this->displayBlock(); $js .= '</form>'; echo $js; }
function getEmailTemplateList() { $user_email_templates = new EmailTemplateUser("blank"); $user_email_templates->getUserSavedEmailTemplates(); $output = ''; if ($user_email_templates->getNumRows()) { $count = 0; while ($user_email_templates->next()) { $e_remove_etml = new Event("do_user_email_teml->eventDeleteUserEmailTmpl"); $e_remove_etml->addParam('id', $user_email_templates->idemailtemplate_user); $e_remove_etml->addParam("goto", $_SERVER['PHP_SELF']); $count++; $output .= '<div id="templt' . $count . '" class="co_worker_item co_worker_desc">'; $output .= '<div style="position: relative;">'; $output .= '<a href="' . $GLOBALS['cfg_plugin_mkt_path'] . 'MEmailTemplate/' . $user_email_templates->idemailtemplate_user . '">' . $user_email_templates->name . '</a>'; $img_del = '<img src="/images/delete.gif" width="14px" height="14px" alt="Delete" />'; $output .= '<div width="15px" id="trashcan' . $count . '" class="deletenote" style="right:0;">' . $e_remove_etml->getLink($img_del, ' title="' . _('Delete') . '"') . '</div>'; $output .= '</div></div>'; } } else { $this->setIsActive(false); } return $output; }
/** * A custom method within the Plugin to generate the content * * @return string : HTML form * @see class/ProjectTask.class.php */ function generateDropBoxBlock() { $output = ''; if ($_SESSION['do_project_task']->drop_box_code) { $output .= _('Use the following Email Id to create a note :') . '<br />'; $emailid = $_SESSION['do_project_task']->getDropBoxEmail(); $output .= '<a href = "mailto:' . $emailid . '">' . $emailid . '</a>'; } else { $e_gen_dropboxid = new Event("do_project_task->eventGenerateDropBoxIdTask"); $e_gen_dropboxid->addParam("goto", "task.php"); $output .= '<br />' . _('No drop box code is generated'); $output .= '<br />' . _('Generate one by') . ' ' . $e_gen_dropboxid->getLink(_('clicking here')); } 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; }
function viewDeletedNote($array, $context = "ContactNote") { $html = '<div class="dottedline"></div><br />'; $e_note_undo = new Event($this->getObjectName() . "->eventUndoNoteById"); foreach ($array as $deleted_note) { if ($context == "ProjectDiscuss") { $note_text = '<b><i>' . substr($deleted_note["discuss"], 0, 100) . ' ...</b></i> ' . _('has been removed'); $e_note_undo->addParam("id", $deleted_note["idproject_task"]); $e_note_undo->addParam("context", "ProjectDiscuss"); } elseif ($context == "ContactNote") { $note_text = '<b><i>' . substr($deleted_note["note"], 0, 100) . ' ...</b></i> ' . _('has been removed'); $e_note_undo->addParam("id", $deleted_note["idcontact_note"]); $e_note_undo->addParam("context", "ContactNote"); } if ($deleted_note["key_val"] == 0) { $key = "No"; } else { $key = $deleted_note["key_val"]; } $e_note_undo->addParam("key_val", $key); $html .= '<div id="note_ctlbar">'; $html .= '<div class="note_ctlbar_text">'; $html .= $note_text; $html .= '</div>'; $html .= '<div class="note_undo">' . $e_note_undo->getLink('Undo') . '</div>'; $html .= ' <div class="spacerblock_2"></div></div>'; } return $html; }
</th> </tr> <?php $do_rec_inv = new RecurrentInvoice(); //echo $_SESSION['do_invoice_list']->getSqlQuery(); if (!$_SESSION['do_invoice_list']->filter_set) { $_SESSION['do_invoice_list']->getAllInvoice(); } else { $_SESSION['do_invoice_list']->query($_SESSION['do_invoice_list']->getSqlQuery()); } if ($_SESSION['do_invoice_list']->getNumRows() > 0) { $do_contact = new Contact(); while ($_SESSION['do_invoice_list']->next()) { $currentpage = $_SERVER['PHP_SELF']; $e_detail = new Event("mydb.gotoPage"); $e_detail->addParam("goto", "invoice.php"); $e_detail->addParam("idinvoice", $_SESSION['do_invoice_list']->idinvoice); $e_detail->addParam("tablename", "invoice"); $e_detail->requestSave("eDetail_invoice", $currentpage); //echo $_SESSION['do_invoice']->idcompany; if ($_SESSION['do_invoice_list']->discount) { $dis = $_SESSION['do_invoice_list']->discount; } else { $dis = ""; } // $invoice_cal_data = $_SESSION['do_invoice']->getInvoiceCalculations($_SESSION['do_invoice']->idinvoice,$_SESSION['do_invoice']->amount,$dis); if ($_SESSION['do_invoice_list']->status == 'Paid') { $statuscolor = "#009900"; } elseif ($_SESSION['do_invoice_list']->status == 'Partial') { $statuscolor = "#EA8484"; } elseif ($_SESSION['do_invoice_list']->status == 'Sent') {
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * create invoice from sales order * @author Abhik Chakraborty */ ?> <div class="container-fluid"> <div class="row-fluid"> <div class="span12" style="margin-left:3px;"> <div class="row-fluid"> <div class="datadisplay-outer"> <?php $e_add_entity = new Event("Invoice->eventAddRecord"); $e_add_entity->addParam("idmodule",15); $e_add_entity->addParam("module","Invoice"); $e_add_entity->addParam("error_page",NavigationControl::getNavigationLink($module,"add")); echo '<form class="form-horizontal" id="Invoice__addRecord" name="Invoice__addRecord" action="/eventcontroler.php" method="post" enctype="multipart/form-data">'; echo $e_add_entity->getFormEvent(); require("edit_view_form_fields.php"); ?> </form> </div> </div><!--/row--> </div><!--/span--> </div><!--/row--> </div> <script> <?php echo $do_crmfields->get_js_form_validation($module_id,"Invoice__addRecord","edit"); ?>
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * create purchase order from vendor view * @author Abhik Chakraborty */ ?> <div class="container-fluid"> <div class="row-fluid"> <div class="span12" style="margin-left:3px;"> <div class="row-fluid"> <div class="datadisplay-outer"> <?php $e_add_entity = new Event("PurchaseOrder->eventAddRecord"); $e_add_entity->addParam("idmodule",16); $e_add_entity->addParam("module","PurchaseOrder"); $e_add_entity->addParam("error_page",NavigationControl::getNavigationLink($module,"add")); echo '<form class="form-horizontal" id="PurchaseOrder__addRecord" name="PurchaseOrder__addRecord" action="/eventcontroler.php" method="post" enctype="multipart/form-data">'; echo $e_add_entity->getFormEvent(); require("edit_view_form_fields.php"); ?> </form> </div> </div><!--/row--> </div><!--/span--> </div><!--/row--> </div> <script> <?php echo $do_crmfields->get_js_form_validation($module_id,"PurchaseOrder__addRecord","edit"); ?>
<option value="sv_SE">Swedish (Sweden)</option> <option value="th_TH">Thai (Thailand)</option> <option value="th_TH_TH">Thai (Thailand,TH)</option> <option value="tr_TR">Turkish (Turkey)</option> <option value="uk_UA">Ukrainian (Ukraine)</option> <option value="vi_VN">Vietnamese (Vietnam)</option> </select> <?php echo $e_gt->getFormFooter("Translate"); ?> <div class="spacerblock_20"></div> <?php $e_gt_translated = new Event("GoogleTranslatorMessage->eventAddTranslateLanguage"); $e_gt_translated->addParam("goto", $_SERVER['PHP_SELF']); $e_gt_translated->addParam("dest_lng", $dest_lng); $e_gt_translated->addParam("key_name", $do_gt->key_name); $e_gt_translated->addParam("context", $do_gt->context); $e_gt_translated->addParam("can_close", $do_gt->can_close); $e_gt_translated->addParam("close_duration", $do_gt->close_duration); $e_gt_translated->addParam("plan", $do_gt->plan); echo $e_gt_translated->getFormHeader(); echo $e_gt_translated->getFormEvent(); ?> <b>Translated content</b><br /> <textarea name="et_content_dst" id="et_content_dst" cols="80" rows="8" wrap=hard><?php if (isset($_SESSION["et_content_src"])) { echo $_SESSION["et_content_src"]; } ?>
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * Create report step7 view * @author Abhik Chakraborty */ $do_report_fields = new ReportFields(); $do_report_folder = new ReportFolder(); $report_folders = $do_report_folder->get_report_folders(); $report_name = ''; $idreport_folder = 0 ; $description = ''; $e_set_report_data = new Event("Report->eventSaveReport"); $e_set_report_data->addParam("step","7"); if (isset($edit) && $edit == 1) { $edit_msg = _('Update Report'); $e_set_report_data->addParam("mode","edit"); $e_set_report_data->addParam("sqrecord",$sqcrm_record_id); $do_report = new Report(); $do_report->getId($sqcrm_record_id); $report_name = $do_report->name; $idreport_folder = $do_report->idreport_folder; $description = $do_report->description; } else { $edit_msg = _('Create Report'); $e_set_report_data->addParam("mode","add"); } echo '<form class="form-horizontal" id="Report__eventSaveReport" name="Report__eventSaveReport" action="/eventcontroler.php" method="post">';
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * @author Abhik Chakraborty */ include_once "config.php"; $e_test = new Event("ListviewAction->eventTest"); $e_test->addParam("ids", $_REQUEST["chk"]); echo '<form class="" id="ListviewAction__eventTest" name="ListviewAction__eventTest" action="/eventcontroler.php" method="post">'; echo $e_test->getFormEvent(); ?> <div class="modal-dialog" role="document"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <span class="label label-warning"><?php echo _('WARNING!'); ?> </span> </div> <div class="modal-body"> <?php echo _('Are you sure you want to submit ?'); ?> </div> <div class="modal-footer"> <a href="#" class="btn btn-default active" data-dismiss="modal"><i class="glyphicon glyphicon-remove-sign"></i> <?php echo _('Close'); ?>
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>'; $htmlform .= '<div class="import_cont3">' . $import_vcard->getFormFooter("Import") . '</div>';
<div class="spacerblock_20"></div> <b>bodyhtml</b><br /> <textarea name="et_body_html_src" id="et_body_html_src" cols="50" rows="5" wrap=hard><?php echo $do_gt->bodyhtml; ?> </textarea> <br /><br /> <?php echo $e_gt->getFormFooter("Translate"); ?> <div class="spacerblock_20"></div> <div class="spacerblock_20"></div> <?php $e_gt_translated = new Event("GoogleTranslatorEmailtemplate->eventAddTranslateLanguage"); $e_gt_translated->addParam("goto", $_SERVER['PHP_SELF']); //$e_gt_translated->addParam("dest_lng",$dest_lng); $e_gt_translated->addParam("name", $do_gt->name); $e_gt_translated->addParam("sendername", $do_gt->sendername); $e_gt_translated->addParam("senderemail", $do_gt->senderemail); echo $e_gt_translated->getFormHeader(); echo $e_gt_translated->getFormEvent(); ?> <b>Subject</b><br /> <input type="text" name="et_sub_dst" id="et_sub_dst" value="<?php if (isset($_SESSION["et_sub_src"])) { echo $_SESSION["et_sub_src"]; } ?> " /> <div class="spacerblock_20"></div>
$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); $_SESSION['InvoiceEditSave']->setFields("invoice_edit"); $_SESSION['InvoiceEditSave']->setApplyRegistry(true, "Form"); ?> <div class="grayline1"></div> <div class="spacerblock_20"></div> <table class="layout_columns"><tr><td class="layout_lcolumn">
include_once "config.php"; $obj = $_REQUEST["classname"]; $module = $_REQUEST["m"]; $return_page = $_REQUEST["referrar"]; $id = (int) $_REQUEST["sqrecord"]; $do_user = new User(); $do_user->get_all_users(); $group_transfer = false; $do_group = new Group(); $do_group->get_all_groups(); //if there is only one group in the system and we choose to delete it then there is no group to trasfer data if ($do_group->getNumRows() > 1) { $group_transfer = true; } $e_del = new Event($obj . "->eventDeleteRecord"); $e_del->addParam("id", $id); $e_del->addParam("next_page", NavigationControl::getNavigationLink($obj, $return_page)); if ($group_transfer === true) { $e_del->addParam("group_transfer_opt", "yes"); } else { $e_del->addParam("group_transfer_opt", "no"); } echo '<form class="form-horizontal" id="' . $obj . '__eventDeleteRecord" name="' . $obj . '__eventDeleteRecord" action="/eventcontroler.php" method="post">'; echo $e_del->getFormEvent(); ?> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h3><span class="label label-info"><?php echo _('Delete group data transfer');
');return false;"> <img src="/themes/images/email.png" style="vertical-align:center;"> <?php echo _('send invoice with email'); ?> </a> </li> </ul> <?php } elseif ($module_id == 16) { ?> <ul class="nav nav-list"> <li> <?php $e_po_pdf = new Event("ExportInventoryData->eventPurchaseOrderPDF"); $e_po_pdf->addParam("m", $module); $e_po_pdf->addParam("mid", $module_id); $e_po_pdf->addParam("record_id", $sqcrm_record_id); ?> <a href="/<?php echo $e_po_pdf->getUrl(); ?> "> <img src="/themes/images/pdf.png" style="vertical-align:center;"> <?php echo _('generate pdf'); ?> </a> </li> <li> <a href="#" onclick="send_po_with_email('<?php
$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> <th class="invoice_list_40pct left_text"><?php
$facebook_logout = new Facebook(array('appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_APP_SECRET, 'cookie' => true, 'domain' => FACEBOOK_CONNECT_DOMAIN)); if ($application_layer_protocol == "https") { $params = array('next' => SITE_URL_HTTPS . '/fb_logout.php'); } else { $params = array('next' => SITE_URL . '/fb_logout.php'); } //$facebook_logout->getLogoutUrl($params); //echo '<a href="'.$facebook_logout->getLogoutUrl($params).'" onclick="">Logout</a>'; //echo '<li><a href="'.$facebook->getLogoutUrl($logout_param).'">Log Out</a></li>'; echo '<a href="#" onclick = "yg_fb_logout();" >Log Out</a>'; // echo '<a href="#" onclick=\'FB.Connect.logoutAndRedirect("/fb_logout.php")\'>Logout</a>'; } else { ?> <?php $e_logout = new Event("do_User->eventLogout"); $e_logout->addParam("goto", "user_login.php"); ?> <a href="<?php echo $e_logout->getUrl(); ?> "><?php echo _('Logout'); ?> </a> <?php } ?> </div> <!-- help tab start--> <?php if ($GLOBALS['thistab'] != 'Help') {
<?php if ($_SESSION['in_page_message'] != '') { echo '<div style="margin-left:0px;">'; echo '<div class="messages_unauthorized">'; echo htmlentities($_SESSION['in_page_message']); $_SESSION['in_page_message'] = ''; echo '</div></div><br /><br />'; } echo nl2br($_SESSION['do_invoice']->invoice_address); //echo '<br />'. _('Total due :').'<b>$'. number_format($invoice_cal_data["total_due_amt"],2, '.', ',' ).'</b>'; echo '<br />' . _('Total due :') . '<b>' . $_SESSION['do_invoice']->viewAmount($_SESSION['do_invoice']->amt_due) . '</b>'; echo '<br /><br />'; $do_user_rel = new UserRelations(); $invoice_url = $GLOBALS['cfg_ofuz_site_http_base'] . 'inv/' . $do_user_rel->encrypt($_SESSION['do_invoice']->idinvoice) . '/' . $do_user_rel->encrypt($_SESSION['do_invoice']->idcontact); $do_payment = new Event("do_invoice->eventProcessAuthNetPayment"); $do_payment->addParam("is_rec", $is_recurrent); $do_payment->addParam("is_cc", $id_rec_cc); // send 0 if not in recurrent else send 1 $do_payment->addParam("goto", $invoice_url); // send 0 if no CC else send 1 $do_payment->addParam("error_page", "invoice_pay_auth.php"); echo $do_payment->getFormHeader(); echo $do_payment->getFormEvent(); echo $_SESSION['do_invoice']->prepareAuthnetForm("Authnet", $_SESSION['do_invoice']->amt_due); //sending the amout ?> </div> </td></tr></table> <div class="spacerblock_40"></div> <div class="layout_footer"></div> </div>
?> </option> </select> </h3> </form> </div> </div> <?php } ?> </div> <?php $e_del_or_tag = new Event("do_Contacts->eventAddTagMultiple"); $e_del_or_tag->addEventAction("mydb.gotoPage", 304); $e_del_or_tag->addParam("goto", "contacts.php"); echo $e_del_or_tag->getFormHeader(); echo $e_del_or_tag->getFormEvent(); ?> <div id="sticky-anchor"></div> <div id="contacts_ctlbar" style="display: none;"> <b><?php echo _('With the selected contacts you can:'); ?> </b><br /> <?php echo _('Add tags') . _(':'); ?> <?php $do_suggest_tag = new Tag(); $do_suggest_tag->setFields("auto_suggest_tag");