示例#1
0
 * The team concept is on hold
*/
exit;
/**COPYRIGHTS**/
// Copyrights 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
$pageTitle = 'Ofuz :: ' . _('Team');
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once 'config.php';
include_once 'includes/ofuz_check_access.script.inc.php';
include_once 'includes/header.inc.php';
$do_teams = new Teams();
$do_teams->getTeams();
$teams_count = $do_teams->getNumRows();
?>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
	
	//'Create New' link clicked
    $('#AncCreateNewTeam').click(function() {
		$("#OfuzSuccessMessage").hide('slow');
		$("#OfuzSuccessMessage")[0].innerHTML = "";
		$('#DivTeamsList').hide('slow');
		$('#DivCreateNewTeam').show('slow');
    });
    
    //button clicked, to add a team
    $('#btnCreateTeam').click(function () {
示例#2
0
 function eventAddContactToTeamCW(Contact $contact)
 {
     $do_teams = new Teams();
     //gets user's teams which are marked as auto-shared
     $do_teams->getUserTeamsAutoShared();
     if ($do_teams->getNumRows()) {
         while ($do_teams->next()) {
             //gets Co-Workers of the team
             $do_teams_cw = new Teams();
             $do_teams_cw->getCoWorkersOfTheTeam($do_teams->idteam);
             if ($do_teams_cw->getNumRows()) {
                 while ($do_teams_cw->next()) {
                     $this->addNew();
                     $this->idcontact = $contact->idcontact;
                     $this->idteam = $do_teams->idteam;
                     $this->idcoworker = $do_teams_cw->idco_worker;
                     $this->add();
                     $this->free();
                     //building contact view table
                     $do_cv = new ContactView();
                     $do_cv->table = "userid" . $do_teams_cw->idco_worker . "_contact";
                     $do_cv->getId($contact->idcontact);
                     if (!$do_cv->hasData()) {
                         $do_cv->addNew();
                         $do_cv->idcontact = $contact->idcontact;
                         $do_cv->firstname = $contact->firstname;
                         $do_cv->lastname = $contact->lastname;
                         $do_cv->company = $contact->company;
                         $do_cv->idcompany = $contact->idcompany;
                         $do_cv->position = $contact->position;
                         $do_cv->picture = $contact->picture;
                         $do_cv->last_activity = date('Y-m-d h:i:s');
                         $do_cv->last_update = date('Y-m-d h:i:s');
                         $do_cv->first_created = date('Y-m-d h:i:s');
                         $do_cv->add();
                         $do_cv->free();
                     }
                     //Conact sharing with Co-Worker
                     $do_cs_check = new ContactSharing();
                     $contact_shared = $do_cs_check->checkCoWorkerContactRel($contact->idcontact, $do_teams_cw->idco_worker);
                     if (!$contact_shared) {
                         $do_cs = new ContactSharing();
                         $do_cs->addNew();
                         $do_cs->iduser = $_SESSION['do_User']->iduser;
                         $do_cs->idcontact = $contact->idcontact;
                         $do_cs->idcoworker = $do_teams_cw->idco_worker;
                         $do_cs->add();
                         $do_cs->free();
                     }
                     $do_cs_check->free();
                 }
             } else {
                 $this->addNew();
                 $this->idcontact = $_SESSION['ContactEditSave']->idcontact;
                 $this->idteam = $do_teams->idteam;
                 $this->add();
                 $this->free();
             }
             $do_teams_cw->free();
         }
     }
     $do_teams->free();
 }