Example #1
0
    echo $e_inv_logo->getFormEvent();
    $_SESSION['InvLogo']->setFields("invoice_logo");
    $_SESSION['InvLogo']->setApplyRegistry(true, "Form");
    echo _('Logo (GIF files are not supported)') . '<br />';
    echo $_SESSION['InvLogo']->setting_value;
    echo '<img src="files/' . $img . '">';
    echo '</td>';
    echo '<td width="10%" style="text-align:left;">';
    echo $e_inv_logo->getFormFooter(_('Save'));
    echo '</td></tr></table>';
} else {
    $e_inv_logo = new Event("InvLogo->eventValuesFromForm");
    $e_inv_logo->addEventAction("InvLogo->add", 2000);
    $e_inv_logo->addEventAction("InvLogo->eventCheckInvLogoExtension", 2);
    echo '<table width="50%" height="100px"><tr><td width="40%">';
    $e_inv_logo->setGotFile(true);
    $e_inv_logo->addEventAction("mydb.gotoPage", 2333);
    $e_inv_logo->addParam("goto", $_SERVER['PHP_SELF']);
    echo $e_inv_logo->getFormHeader();
    echo $e_inv_logo->getFormEvent();
    $_SESSION['InvLogo']->setFields("invoice_logo");
    $_SESSION['InvLogo']->setApplyRegistry(true, "Form");
    echo _('Logo (GIF files are not supported)') . '<br />';
    echo $_SESSION['InvLogo']->setting_value;
    echo $_SESSION['InvLogo']->setting_name;
    echo $_SESSION['InvLogo']->iduser;
    echo '</td>';
    echo '<td width="10%" style="text-align:left;">';
    echo $e_inv_logo->getFormFooter(_('Save'));
    echo '</td></tr></table>';
}
Example #2
0
?>
            
            
        </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: ') . '&nbsp; </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>';
$htmlform .= "\n";
echo $htmlform;
?>
    <?php 
if ($_GET['msg']) {
    echo '<div class="import_msg1">' . htmlentities($_GET['msg']) . '</div>';
}
?>
Example #3
0
function submitImportForm() {
  document.getElementById('loader').style.display = 'block';
  document.getElementById('RestoreAccount__eventImportAccount').submit();
  document.getElementById('loader').style.display = '';
}
</script>
<div class="import_cont3" id="loader" style="display:none;"><img src="/images/ajax-loader1.gif" border="0" /></div>
<?php 
include_once "config.php";
ini_set('max_execution_time', 300);
//300 seconds = 5 minutes
if ($_SESSION['in_page_message'] != "") {
    echo '<div class="import_cont3"><b>' . $_SESSION['in_page_message'] . '</b></div>';
}
$import_xml = new Event("RestoreAccount->eventImportAccount");
$import_xml->addParam("goto", $_SERVER["PHP_SELF"]);
$import_xml->setGotFile(true);
$import_xml->setSecure(true);
$htmlform = $import_xml->getFormHeader();
$htmlform .= $import_xml->getFormEvent();
$htmlform .= '<div class="import_cont3"><b>File Location: &nbsp; </b>';
$htmlform .= '<input type="file" name="fields[import_account]">';
//$htmlform .= $import_xml->getFormFooter("Import").'</div>';
$htmlform .= '<input type="button" name="button" value="Import" onclick="javascript:submitImportForm();"/>';
$htmlform .= '</form></div>';
$htmlform .= "\n";
echo $htmlform;
$_SESSION['in_page_message'] = "";
?>

 /**
  * 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') . '&nbsp;&nbsp;';
         $html .= '<input type="radio" name="fields[discuss_edit_access]" value="user coworker" ' . $user_coworker_checked . '>' . _('My Co-Workers and I') . '&nbsp;&nbsp;';
         $html .= '</div>';
         $html .= '<div style="text-align:right">';
         $html .= '<input type="submit" name="Save" value="' . _('Save') . '">&nbsp;&nbsp;<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') . '">&nbsp;&nbsp;<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);
         }
     }
 }
Example #5
0
    $do_contact->iduser = $_SESSION['do_User']->iduser;
    $do_contact->add();
    $idcontact_inserted = $do_contact->getPrimaryKeyValue();
    $do_contact_view = new ContactView();
    $_SESSION['do_User']->idcontact = $idcontact_inserted;
    $do_contact->getId($idcontact_inserted);
}
$_SESSION['edit_from_page'] = 'settings_myinfo.php';
$do_contact->sessionPersistent("ContactEditSave", "contact.php", OFUZ_TTL);
//$do_contact->sessionPersistent("ContactEditSave", "index.php", 120);
//$do_np_contact->sessionPersistent("ContactPictureSave", "index.php", 120);
$do_np_contact->sessionPersistent("ContactPictureSave", "index.php", OFUZ_TTL);
$_SESSION['ContactPictureSave']->getId($idcontact);
$e_fullContact = new Event("ContactPictureSave->eventValuesFromForm");
$e_fullContact->setLevel(1999);
$e_fullContact->setGotFile(true);
$e_fullContact->addEventAction("ContactPictureSave->update", 2000);
echo $e_fullContact->getFormHeader();
echo $e_fullContact->getFormEvent();
$_SESSION['ContactPictureSave']->setFields("contact_my_info");
$_SESSION['ContactPictureSave']->setApplyRegistry(true, "Form");
?>
                    

        <div class="profile_subject_line">
        <div class="my_profile">My Profile&nbsp;
        <span class="edit_profile">
          <a href="/contact_edit.php?r=bio">Edit Profile</a>
          </b> 
          </span> 
        </div>
Example #6
0
 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') . '">&nbsp;&nbsp;<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);
     }
 }
Example #7
0
echo _('To start import, browse to locate file .csv file and click on the Next button to continue.');
?>
        </div>
<?php 
//$upload_csv = $_SESSION['do_contact_import']->newForm('do_contact_import->eventCsvUpload');
if ($_SESSION['csv_file']) {
    unset($_SESSION['csv_file']);
}
$upload_csv = new Event("ContactImport->eventCsvUpload");
$upload_csv->addParam("goto", "contact_import_parse.php");
if ($_SESSION["page_from"] == 'reg') {
    $upload_csv->addParam("fromReg", "Yes");
} else {
    $upload_csv->addParam("fromReg", "No");
}
$upload_csv->setGotFile(true);
$upload_csv->setSecure(true);
$htmlform = $upload_csv->getFormHeader();
$htmlform .= $upload_csv->getFormEvent();
$htmlform .= '<div class="import_cont3"><b>File Location: &nbsp; </b>';
$htmlform .= '<input type="file" name="fields[contact_csv]"></div>';
$htmlform .= '<div class="import_cont3"><b>Set Tag <input type="text" name="fields[import_tag]" value="import_' . date("Y-m-d") . '"> on the imported contacts.</b></div>';
$htmlform .= '<div class="import_cont3">' . $upload_csv->getFormFooter("Next") . '</div>';
$htmlform .= "\n";
echo $htmlform;
?>
<!--
        <form action="contact_import_parse.php" method="post" enctype="multipart/form-data">
            <div class="import_cont3"> <span class="import_cont4">File Location: </span><input name="uploadedfile" type="file" /></div>
            <div class="import_next"><input type="submit" value="Next" /></div>
        </form>