Esempio n. 1
0
 function generateCoWorkersListNotAddedInTeam($lastInsertedId)
 {
     $str_idco_workers = "";
     $cw_list = "";
     $coworkers = $this->getTeamCoWorkersId($lastInsertedId);
     if (count($coworkers)) {
         $str_idco_workers = implode(',', $coworkers);
     }
     $do_cw = new UserRelations();
     $do_cw->getAllCoWorkersNotInTeam($str_idco_workers);
     if ($do_cw->getNumRows()) {
         $cw_list .= "<div>You can add Co-Worker/s to this Team.</div>";
         while ($do_cw->next()) {
             $cw_list .= '<div><input type="checkbox" name="coworker" value="' . $do_cw->idcoworker . '" />' . $do_cw->firstname . ' ' . $do_cw->lastname . '</div>';
         }
     }
     if ($cw_list) {
         $cw_list .= '<div>';
         $cw_list .= '<input type="button" name="btnAddCoWorkers" id="btnAddCoWorkers" value="Add" onclick="addCoWorkerToTeam();" />';
         $cw_list .= '<input type="button" name="btnSkipCoWorkers" id="btnSkipCoWorkers"value="Skip" onclick="skipAddCoWorker();" />';
         $cw_list .= '<input type="hidden" name="idteam_users" id="idteam_users" value="' . $lastInsertedId . '"';
         $cw_list .= '</div>';
     } else {
         $cw_list = 'You do not have a Co-Worker.';
     }
     return $cw_list;
 }
 function default_Form($field_value = "")
 {
     $do_user_rel = new UserRelations();
     if (!$this->getRData('hidden') && !$this->getRData('readonly')) {
         if (!$this->getRdata('execute')) {
             $field_value = $this->no_PhpCode($field_value);
             $field_value = $do_user_rel->decrypt($field_value);
         }
         if ($this->getRdata("loginform")) {
             $fval .= "<input type=\"password\" name=\"fields[" . $this->getFieldName() . "]\" value=\"" . $field_value . "\"/>";
         } else {
             $fval = "<input name=\"accessfield[" . $this->getRData('access') . "]\" type=\"hidden\" value=\"" . $this->getFieldName() . "\"/>";
             $fval .= "<input type=\"hidden\" name=\"mydb_events[22]\" value=\"ofuz.encryptDecryptPassword\">";
             $fval .= "<input type=\"hidden\" name=\"mydb_events[20]\" value=\"mydb.checkUsernamePassword\">";
             $fval .= "<input type=\"password\" name=\"fields[" . $this->getFieldName() . "]\" value=\"" . $field_value . "\"/>";
             $fval .= "\n<br/><input type=\"password\" name=\"fieldrepeatpass[" . $this->getFieldName() . "]\" value=\"" . $field_value . "\"/>";
         }
         $this->processed .= $fval;
     }
 }
Esempio n. 3
0
 /**
  * Method to send Send Invoice Apporove/Reject Email to the Invoice Owner
  * @param $iduser -- INT
  * @param $idinvoice -- INT
  * @param $status -- STRING
  * @param $rejected_reason -- STRING
  */
 function sendInvoiceApproveReject($iduser, $idinvoice, $status, $rejected_reason = "")
 {
     $do_inv = new Invoice();
     $do_inv_user = new User();
     $do_contact = new Contact();
     $do_inv->getId($idinvoice);
     $do_inv_user->getId($iduser);
     $do_contact->getId($do_inv->idcontact);
     $total_due = $do_inv->amt_due;
     $inv_num = $do_inv->num;
     $inv_desc = $do_inv->description;
     $inv_address = nl2br($this->Only1brFirstLineBlack($do_inv->invoice_address));
     $contact_name = $do_contact->firstname . ' ' . $do_contact->lastname;
     if ($do_contact->email_address != '') {
         $contact_email = $do_contact->email_address;
     } else {
         $ContactEmail = $do_contact->getChildContactEmail();
         if ($ContactEmail->getNumRows()) {
             $contact_email = $ContactEmail->email_address;
         }
     }
     if ($contact_email == '') {
         $contact_email = '*****@*****.**';
     }
     if ($status == "Accept") {
         $email_template = new EmailTemplate("ofuz_inv_accept_confirmation");
     }
     $do_user_rel = new UserRelations();
     $invoice_url = $GLOBALS['cfg_ofuz_site_https_base'] . 'inv/' . $do_user_rel->encrypt($idinvoice) . '/' . $do_user_rel->encrypt($do_inv->idcontact);
     //$email_template->setSubject(_("Invoice #").$inv_num.' '.$inv_desc." "._("has been accepted by")." ".$contact_name);
     $email_template->setSenderName($contact_name);
     $email_template->setSenderEmail($contact_email);
     $signature = $inv_address;
     $email_data = array('name' => $contact_name, 'contact' => $contact_name, 'description' => $inv_desc, 'signature' => $signature, 'amount' => $total_due, 'num' => $inv_num, 'invoice_url' => $invoice_url, 'address' => $inv_address);
     $emailer = new Radria_Emailer();
     $emailer->setEmailTemplate($email_template);
     $emailer->mergeArray($email_data);
     $emailer->addTo($do_inv_user->email);
     $emailer->send();
 }
Esempio n. 4
0
  </div>
  <?php 
    echo _('Embed code to insert in your blog or web site');
    ?>
  <div>
  <textarea rows="2" cols="100"><script type="text/javascript" src="<?php 
    echo $GLOBALS['cfg_ofuz_site_http_base'] . 'js_form.php?fid=' . $_SESSION['do_userform']->getPrimaryKeyValue();
    ?>
"></script>
                </textarea>
  </div>
<!-- Display webform html start -->
<div>
  <?php 
    $fid = $_SESSION['do_userform']->getPrimaryKeyValue();
    $do_user_rel = new UserRelations();
    $efid = $do_user_rel->encrypt($fid);
    $do_webformuser = new WebFormUser();
    $do_webformuser->getId($_SESSION['do_userform']->getPrimaryKeyValue());
    $do_webformuser->sessionPersistent("do_webformuser", "index.php", OFUZ_TTL);
    $do_webformuser->newForm('do_webformuser->eventAddContact');
    if ($do_webformuser->email_alert == 'y') {
        $do_webformuser->form->addEventAction("do_webformuser->eventSendEmailAlert", 300);
    }
    $js = '';
    if (strlen($do_webformuser->title) > 0) {
        $js .= $do_webformuser->title . '<br />';
    }
    if (strlen($do_webformuser->description) > 0) {
        $js .= $do_webformuser->description . '<br />';
    }
 /**
  * A custom method within the Plugin to generate the content
  * 
  * @return string : HTML form
  * @see class/UserRelations.class.php
  * @see class/Project.class.php
  */
 function generateAddCoworkerBlock()
 {
     $output = '';
     $output .= '<div class="percent95">';
     $isProjectOwner = false;
     if ($_SESSION["do_project"]->isProjectOwner()) {
         $isProjectOwner = true;
     }
     /* Adding Co-Workers are allowed only if the project owner is
          the user
        */
     if ($isProjectOwner) {
         $do_user_rel = new UserRelations();
         $do_user_rel->getAllCoWorker();
         $co_worker_added_in_ofuz = false;
         if ($do_user_rel->getNumRows()) {
             $co_worker_added_in_ofuz = true;
         }
         if ($co_worker_added_in_ofuz) {
             $e_share_project = new Event("do_project->eventShareProjects");
             $e_share_project->addParam("goto", "Project/" . $_SESSION["do_project"]->idproject);
             $e_share_project->addParam("idproject", $_SESSION["do_project"]->idproject);
             $output .= $e_share_project->getFormHeader();
             $output .= $e_share_project->getFormEvent();
             $output .= $_SESSION["do_project"]->addProjectCoWorkerForm();
             $output .= $e_share_project->getFormFooter();
             $co_workers = $_SESSION["do_project"]->getProjectCoWorkersAsOwner();
             if (!$co_workers) {
                 //echo '<br />';
                 //echo _('No Co-Workers added for this project');
             } else {
                 if (is_array($co_workers)) {
                     $output .= '<br /><br /><b>';
                     $output .= _('Participating Co-Workers:');
                     $output .= '</b><br/>';
                     foreach ($co_workers as $co_workers) {
                         $e_del_coworker = new Event("do_project->eventDelProjectCoWorker");
                         $e_del_coworker->addParam("goto", "Project/" . $_SESSION["do_project"]->idproject);
                         $e_del_coworker->addParam("idproject", $_SESSION["do_project"]->idproject);
                         $e_del_coworker->addParam("idcoworker", $co_workers["idcoworker"]);
                         $output .= '<div id="templt' . $count . '" class="co_worker_item co_worker_desc">';
                         $output .= '<div style="position: relative;">';
                         $output .= $co_workers["firstname"] . ' ' . $co_workers["lastname"];
                         $img_del = '<img class="delete_icon_tag" border="0" width="14px" height="14px" src="/images/delete.gif">';
                         $output .= '<div width="15px" id="trashcan' . $count . '" class="deletenote" style="right:0;">' . $e_del_coworker->getLink($img_del, ' title="' . _('Remove') . '"') . '</div>';
                         $output .= '</div></div>';
                     }
                 }
             }
         } else {
             $output .= _('If you want to share this project with others, add Co-Workers to your Ofuz account');
             $output .= '<br />';
             $output .= '<a href="/co_workers.php">';
             $output .= _('add Co-Workers');
             $output .= '</a>';
         }
     } else {
         $co_workers = $_SESSION["do_project"]->getProjectCoWorkers($_SESSION["do_project"]->idproject);
         if (is_array($co_workers)) {
             foreach ($co_workers as $co_workers) {
                 if ($co_workers["idcoworker"] == $_SESSION["do_User"]->iduser) {
                     $e_del_coworker = new Event("do_project->eventSelfDelProjectCoWorker");
                     $e_del_coworker->addParam("goto", "Project/" . $_SESSION["do_project"]->idproject);
                     $e_del_coworker->addParam("idcoworker", $co_workers["idcoworker"]);
                     $e_del_coworker->addParam("idproject", $_SESSION["do_project"]->idproject);
                     $output .= '<div id="templt' . $count . '" class="co_worker_item co_worker_desc">';
                     $output .= '<div style="position: relative;">';
                     $output .= $co_workers["firstname"] . ' ' . $co_workers["lastname"];
                     $img_del = '<img class="delete_icon_tag" border="0" width="14px" height="14px" src="/images/delete.gif">';
                     $output .= '<div width="15px" id="trashcan' . $count . '" class="deletenote" style="right:0;">' . $e_del_coworker->getLink($img_del, ' title="' . _('Remove') . '"') . '</div>';
                     $output .= '</div></div>';
                 } else {
                     $output .= $co_workers["firstname"] . ' ' . $co_workers["lastname"] . '<br />';
                 }
             }
         }
     }
     $output .= '</div>';
     return $output;
 }
<?php

/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
// Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
$password = $fields["password"];
if ($password != '') {
    $do_user_rel = new UserRelations();
    $enc_password = $do_user_rel->encrypt($password);
    $fields["password"] = $enc_password;
    $this->updateParam("fields", $fields);
}
Esempio n. 7
0
<div class="loginbg1">
    <div class="loginheader"><a href="/index.php"><img src="/images/ofuz_logo2.jpg" width="170" height="90" alt="" /></a></div>
    <div class="loginbg2">
<?php 
if ($_GET['message']) {
    ?>
<div class="error_message"><?php 
    echo htmlentities(stripslashes($_GET['message']));
    ?>
</div>
<?php 
}
$do_user = new User();
$do_user->sessionPersistent("do_User", "signout.php", 36000);
if ($_GET['id']) {
    $do_user_rel = new UserRelations();
    //echo $do_user_rel->decrypt($_GET['id']);
    $do_user_rel->getId($do_user_rel->decrypt($_GET['id']));
    if ($do_user_rel->checkRegURL($do_user_rel->enc_email, $_GET['id'])) {
        $_SESSION['do_User']->formRegisterInvitation('index.php', 'regthank', 'admin_registration_alert', '*****@*****.**', $do_user_rel->enc_email, $_GET['id'], $_SERVER['PHP_SELF']);
    } else {
        echo _('Please check the URL');
    }
} else {
    /* $_SESSION['do_User']->formRegister('import_contacts.php',
       'regthank',
       'admin_registration_alert',
       '*****@*****.**'
       ); */
    $_SESSION['do_User']->formRegister('ww_s1.php', 'regthank', 'admin_registration_alert', '*****@*****.**');
}
Esempio n. 8
0
        </div>
        <div class="layout_textlinks">
        <?php 
if ($_SESSION['do_User']->global_fb_connected && $_SESSION['do_User']->fb_user_id) {
    //echo '<span style="float: left;"><b>Hello , </b>&nbsp;&nbsp;</span><span style="float: left;"><fb:profile-pic uid="'.$_SESSION['do_User']->fb_user_id.'" facebook-logo="true" linked="true" width="50" height="50"></fb:profile-pic></span>';
    echo 'Welcome, <img src=\'https://graph.facebook.com/' . $_SESSION['do_User']->fb_user_id . '/picture\' height="37"/><span class="username">' . $_SESSION['do_User']->firstname . '</span>';
    echo '<span class="sep1">|</span>';
} else {
    if ($_SESSION['do_User']->iduser) {
        echo '<span style="float: left;"><b>Hello , ' . $_SESSION['do_User']->firstname . ' </b>&nbsp;&nbsp;</span>';
    }
}
?>
        <?php 
if (!is_object($_SESSION['do_coworker'])) {
    $co_worker_form = new UserRelations();
    $co_worker_form->sessionPersistent("do_coworker", "index.php", 36000);
}
$_SESSION['do_coworker']->getAllRequest();
$co_worker_str = '';
if ($_SESSION['do_coworker']->getNumrows()) {
    $no_invitation = $_SESSION['do_coworker']->getNumrows();
    $co_worker_str = '&nbsp;(' . $no_invitation . ')';
}
if ($co_worker_str != '') {
    ?>
            <span style="background-color: #ffffcc;">
                <a style="color: orange;" href="/co_workers.php"><?php 
    echo _('Co-Workers'), $co_worker_str;
    ?>
</a>
Esempio n. 9
0
<?php 
$do_other_due_inv = new Invoice();
$do_other_due_inv->getDueInvoicesForContact($idcontact);
if ($do_other_due_inv->getNumRows()) {
    ?>
        <div class="left_menu_header">
            <div class="left_menu_header_content"><?php 
    echo _('Other invoice due');
    ?>
</div>
        </div>
        <div class="left_menu">
            <div class="left_menu_content">
				<table width="100%">
				<?php 
    $do_user_rel = new UserRelations();
    while ($do_other_due_inv->next()) {
        $invoice_url = "";
        $invoice_url = $GLOBALS['cfg_ofuz_site_https_base'] . 'inv/' . $do_user_rel->encrypt($do_other_due_inv->idinvoice) . '/' . $do_user_rel->encrypt($do_other_due_inv->idcontact);
        $due_inv_link = $do_other_due_inv->num . " - " . $do_other_due_inv->datecreated . " - " . $_SESSION['do_invoice']->viewAmount($do_other_due_inv->amt_due);
        echo '<a href="' . $invoice_url . '">' . $due_inv_link . '</a>';
        echo '<br />';
    }
    ?>
				</table>
            </div>
        </div>
        <div class="left_menu_footer"></div><br /><br />
<?php 
}
?>
Esempio n. 10
0
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once 'config.php';
// include_once('includes/header_secure.inc.php');
$do_notes = new ContactNotes($GLOBALS['conx']);
$do_contact = new Contact($GLOBALS['conx']);
$do_company = new Company($GLOBALS['conx']);
$do_task = new Task($GLOBALS['conx']);
$do_task_category = new TaskCategory($GLOBALS['conx']);
$do_contact_task = new Contact();
$invoice_access = true;
if (empty($_GET["idinv"]) || empty($_GET["idcon"])) {
    $invoice_access = false;
} else {
    $do_user_rel = new UserRelations();
    $idinvoice = $do_user_rel->decrypt($_GET["idinv"]);
    $idcontact = $do_user_rel->decrypt($_GET["idcon"]);
}
if ($invoice_access) {
    if (!is_object($_SESSION['do_invoice'])) {
        $do_invoice = new Invoice();
        $do_invoice->sessionPersistent("do_invoice", "index.php", OFUZ_TTL);
    }
    $do_company = new Company();
    $_SESSION['do_invoice']->getId($idinvoice);
    if ($idcontact != $_SESSION['do_invoice']->idcontact) {
        $invoice_access = false;
    }
    if ($_SESSION['do_invoice']->discount) {
        $dis = $_SESSION['do_invoice']->discount;
Esempio n. 11
0
ob_start();
include_once "config.php";
include_once "class/OfuzApiMethods.class.php";
include_once "class/OfuzApiClient.class.php";
$api_key = 'f1976041736ccb95fbb322e1e5c07cbf';
// replace this with your API key
$user = new User();
$iduser = $user->validateAPIKey($api_key);
$idcontact = $_SESSION['do_User']->idcontact;
//check for invoice already generated but not paid, if yes redirect to payment page
if (!empty($idcontact)) {
    $invoice = new Invoice();
    $idinvoice = $invoice->getContactInvoiceDetailsForPlanUpgrade($idcontact, $iduser);
    //echo "idinvoice: ".$idinvoice;exit();
    if ($idinvoice != '0') {
        $do_api_user_rel = new UserRelations();
        //$pay_url =  'http://ofuz.localhost/pay/'.$do_api_user_rel->encrypt($idinvoice).'/'.$do_api_user_rel->encrypt($idcontact);
        $pay_url = $GLOBALS['cfg_ofuz_site_https_base'] . 'pay/' . $do_api_user_rel->encrypt($idinvoice) . '/' . $do_api_user_rel->encrypt($idcontact);
        @header("location:{$pay_url}");
        exit;
    }
}
$do_ofuz = new OfuzApiClient($api_key, 'php');
// $iduser = $do_ofuz->setAuth($api_key);
// $do_ofuz->format = "php";// json,xml,php
$do_ofuz->firstname = $_SESSION['do_User']->firstname;
$do_ofuz->lastname = $_SESSION['do_User']->lastname;
$response = $do_ofuz->search_contact();
$response = unserialize($response);
//echo'<pre>';print_r($response);echo'</pre>';
if ($response[stat] == 'fail') {
Esempio n. 12
0
 function upgrade_plan_add_invoice()
 {
     $add_call_back_url = false;
     $do_contact_invoice = new Contact();
     $do_api_invoice = new Invoice();
     $do_api_invoice->addNew();
     $do_contact_invoice->setSqlViewName($_SESSION["do_User"]->iduser);
     //  set the sqlview name
     $do_api_invoice->idcontact = $this->idcontact;
     $do_api_invoice->iduser = $this->iduser;
     $do_api_invoice->status = $this->type;
     // could be status
     $do_api_invoice->num = $do_api_invoice->getUniqueInvoiceNum($this->iduser);
     $do_api_invoice->datecreated = date("Y-m-d");
     $do_api_invoice->due_date = $this->due_date;
     $do_api_invoice->invoice_address = $do_contact_invoice->ajaxGetInvoiceAddress($this->idcontact);
     $do_api_invoice->invoice_term = $this->invoice_term;
     $do_api_invoice->invoice_note = $this->invoice_note;
     $do_api_invoice->description = $this->description;
     $do_contact_invoice->getId($this->idcontact);
     $do_api_invoice->idcompany = $do_contact_invoice->idcompany;
     $do_api_invoice->amt_due = $this->amt_due;
     $do_api_invoice->sub_total = $this->sub_total;
     $do_api_invoice->net_total = $this->net_total;
     $do_api_invoice->discount = $this->discount;
     $do_api_invoice->add();
     $idinvoice = $do_api_invoice->getPrimaryKeyValue();
     /** 
      * Will Add an entry to the Invoice line table 
      * */
     if ($_SESSION["upgrade"]) {
         $do_invoice_line = new InvoiceLine();
         $do_invoice_line->idinvoice = $idinvoice;
         $do_invoice_line->item = 'User Plan Upgrade';
         $do_invoice_line->price = $this->amt_due;
         $do_invoice_line->qty = 1;
         $do_invoice_line->total = $this->amt_due;
         $do_invoice_line->description = $this->description;
         $do_invoice_line->add();
     }
     //add to table invoice call back for trail users
     $url = $this->url;
     $next_url = $this->next_url;
     $invoice_call_back = new InvoiceCallback();
     $invoice_call_back->addCallBackUrl($idinvoice, $url, $next_url);
     /*if($add_call_back_url){
           $do_api_inv_call_back = new InvoiceCallback();
           $callback = $do_api_inv_call_back->addCallBackUrl($idinvoice,$this->callback_url,$this->next_url);
       }*/
     $do_api_user_rel = new UserRelations();
     //$inv_url =  $GLOBALS['cfg_ofuz_site_https_base'].'inv/'.$do_api_user_rel->encrypt($idinvoice).'/'.$do_api_user_rel->encrypt($this->idcontact);
     $pay_url = $GLOBALS['cfg_ofuz_site_https_base'] . 'pay/' . $do_api_user_rel->encrypt($idinvoice) . '/' . $do_api_user_rel->encrypt($this->idcontact);
     //$inv_url =  'http://ofuz.localhost/inv/'.$do_api_user_rel->encrypt($idinvoice).'/'.$do_api_user_rel->encrypt($this->idcontact);
     //$pay_url =  'http://ofuz.localhost/pay/'.$do_api_user_rel->encrypt($idinvoice).'/'.$do_api_user_rel->encrypt($this->idcontact);
     return $pay_url;
 }
Esempio n. 13
0
    echo "checked";
}
?>
/> <br />
		 <input type="button" id="btnEditTeam" name="btnEditTeam" value="Edit" />
		 </div>
		 <!-- Edit Co-Worker/s-->
		 <div id="DivEditCW" style="display:none;margin-top:20px;">
<?php 
$e_cw = new Event("Teams->eventUpdateTeamCWs");
$e_cw->addParam("idteam", $idteam);
$e_cw->addParam("goto", "teams.php");
echo $e_cw->getFormHeader();
echo $e_cw->getFormEvent();
$arr_cw = $do_team->getTeamCoWorkersId($idteam);
$do_ur = new UserRelations();
$do_ur->getAllCoWorker();
if ($do_ur->getNumRows()) {
    while ($do_ur->next()) {
        ?>
<div><input type="checkbox" name="coworker[]" value="<?php 
        echo $do_ur->idcoworker;
        ?>
" <?php 
        if (in_array($do_ur->idcoworker, $arr_cw)) {
            echo "checked";
        }
        ?>
 /><?php 
        echo $do_ur->firstname . " " . $do_ur->lastname;
        ?>
Esempio n. 14
0
 function eventRegistrationValidation(EventControler $evtcl)
 {
     $fields = $evtcl->fields;
     $do_user_rel = new UserRelations();
     if ($evtcl->errPage != '') {
         $errorpage = $evtcl->errPage;
     } else {
         $errorpage = "user_register.php";
     }
     if (trim($fields["firstname"]) == "" || trim($fields["lastname"]) == "" || trim($fields["email"]) == "" || trim($fields["username"]) == "" || trim($fields["password"]) == "" || trim($evtcl->fieldrepeatpass["password"]) == "") {
         $evtcl->validation_fail = 'Yes';
         $msg = "You must fill the required fields";
         $errorpage = $evtcl->errorpage;
         $dispError = new Display($errorpage);
         $dispError->addParam("id", $evtcl->id);
         $dispError->addParam("message", $msg);
         $evtcl->setDisplayNext($dispError);
     } elseif (trim($fields["password"]) != $do_user_rel->encrypt($evtcl->fieldrepeatpass["password"])) {
         $evtcl->validation_fail = 'Yes';
         $msg = "Both the Password are not matching";
         $errorpage = $evtcl->errorpage;
         $dispError = new Display($errorpage);
         $dispError->addParam("id", $evtcl->id);
         $dispError->addParam("message", $msg);
         $evtcl->setDisplayNext($dispError);
     } else {
         $evtcl->validation_fail = 'No';
     }
 }
Esempio n. 15
0
		  $email = $_SESSION["eDetail_invite_cw"]->getparam("email");
		  $name = $firstname." ".$lastname;
   */
$idcontact = $do_contact->idcontact;
$firstname = $do_contact->firstname;
$lastname = $do_contact->lastname;
$email = $do_contact->email;
$name = $firstname . " " . $lastname;
if (!is_object($_SESSION['do_cont'])) {
    $do_cont = new Contact();
    $do_cont->sessionPersistent("do_cont", "index.php", OFUZ_TTL);
    $_SESSION['do_cont']->idcontact = $idcontact;
}
$do_cont_emails = new ContactEmail();
$arr_contact_emails = $do_cont_emails->getContactEmails($idcontact);
$do_co_worker = new UserRelations();
$do_user = new User();
$do_user->getUserDetailsByNameEmail($firstname, $lastname, $arr_contact_emails);
if ($do_user->getNumRows()) {
    echo '<div class="solidline"></div>';
    while ($do_user->next()) {
        echo '<div class="contacts" >';
        echo '<div class="contacts_desc">';
        $full_name = $do_user->firstname . ' ' . $do_user->lastname;
        $invite = "Invite " . $full_name;
        $e_add_coworker = new Event("UserRelations->eventAddAsCoWorker");
        $e_add_coworker->addParam("iduser", $_SESSION['do_User']->iduser);
        $e_add_coworker->addParam("idcoworker", $do_user->iduser);
        $e_add_coworker->addParam("goto", $_SERVER['PHP_SELF']);
        $relation = $do_co_worker->getCoWorkerRelationData($do_user->iduser);
        //echo $e_add_coworker->getLink($invite);
Esempio n. 16
0
<?php

// display a user password
include "config.php";
$d = new UserRelations();
echo $d->decrypt("qM1vsedZt7nWydzE");
Esempio n. 17
0
<?php

/**
 * Webform eventcontoler scipt will get post content form webform html section and process to the database. 
 * @param POST data
 * Created on Dec 30 2011
 * */
include_once "config.php";
$fields = array();
$efid = $_POST['fid'];
$euid = $_POST['uid'];
$tags = $_POST['tags'];
$do_user_rel = new UserRelations();
$fid = $do_user_rel->decrypt($efid);
$uid = $do_user_rel->decrypt($euid);
//$do_userform = new WebFormUser();
//$do_userform->posteventAddContact($fid,$_POST['fields'],$nxturl,$uid,$tags);
$evctl = new EventControler();
$evctl->addParam('fields', $_POST['fields']);
$evctl->addParam('uid', $uid);
$evctl->addParam('fid', $fid);
$do_userform = new WebFormUser();
$do_userform->eventAddContact($evctl);
Esempio n. 18
0
        <div class="left_menu_footer"></div><br /><br />-->
    </td><td class="layout_rcolumn">
        <div class="contentfull">
           <?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>
Esempio n. 19
0
 /**
  * Event method to set the Identification after Twitter login and user details
  * verification
  * @param $evtcl -- Object
  */
 function eventCheckIdentificationOnTwLogin(EventControler $evtcl)
 {
     setcookie('ofuz', '1', time() + 25920000);
     if ($evtcl->tw_user_id && $evtcl->tw_user_id != '' && $evtcl->tw_screen_name && $evtcl->tw_screen_name != '' && $evtcl->tw_token && $evtcl->tw_token != '') {
         if (strlen($evtcl->password_field) > 0) {
             $password_field = $evtcl->password_field;
             $this->setPasswordField($evtcl->password_field);
         } else {
             $password_field = $this->getPasswordField();
         }
         if (strlen($evtcl->username_field) > 0) {
             $username_field = $evtcl->username_field;
             $this->setUsernameField($evtcl->username_field);
         } else {
             $username_field = $this->getUsernameField();
         }
         $fields = $evtcl->fields;
         $auth_username = $fields[$username_field];
         $auth_password = $fields[$password_field];
         // Changes made to encrypt the password before looking in the DB
         $do_user_rel = new UserRelations();
         $auth_password = $do_user_rel->encrypt($auth_password);
         $this->query("select * from `" . $this->table . "` \n                              where `username`='" . $this->quote($auth_username) . "' \n                              and `password`='" . $this->quote($auth_password) . "'");
         if ($this->getNumrows() == 1) {
             if ($this->status == 'active') {
                 $this->query("INSERT INTO twitter_account (iduser, tw_user_id, tw_screen_name, tw_token) VALUES (" . $this->iduser . ",'" . $evtcl->tw_user_id . "','" . $evtcl->tw_screen_name . "','" . $evtcl->tw_token . "')");
                 $this->setSessionVariable();
                 $do_login_audit = new LoginAudit();
                 $do_login_audit->do_login_audit('Twitter');
                 $evtcl->setUrlNext($evtcl->goto);
             } else {
                 $err_disp = new Display($evtcl->errPage);
                 $msg = _("Your account is not currently active, contact our tech support at " . $GLOBALS['cfg_ofuz_email_support']);
                 $_SESSION['crdmsg'] = $msg;
                 $err_disp->addParam("message", $msg);
                 $eventControler->setDisplayNext($err_disp);
             }
         } else {
             $err_disp = new Display($evtcl->errPage);
             $msg = "Sorry! But there is no user found with the supplied details.";
             $err_disp->addParam("message", $msg);
             $evtcl->setDisplayNext($err_disp);
         }
     } else {
         $err_disp = new Display($evtcl->errPage);
         $msg = "Sorry! But seems like you are not connected to Twitter. Please connect first.";
         $err_disp->addParam("message", $msg);
         $evtcl->setDisplayNext($err_disp);
     }
 }