require_once("include.html"); /////////// //title $skindata['title'] = $otherconfig["TITLETEXT"] . nametitle() .' - '. $lang[MSG_GROUPS] ; //pagetitle $skindata['pagetitle']= $lang[MSG_GROUPS]; checksession($id); // $private = true; $readonly = ""; $DBcalendar=""; if ($global) { $readonly = 1; $saveAS=2; // saveAS: 0=DB+Text , 1=DB, 2=Text } if(!$otherconfig[DISABLESERVERADDRESS] && $otherconfig["FULLMERAK"]) { $DBcalendar=1; require_once("inc/function.calendar.php"); $target=1; include("sharingoption.html"); $sessid = logtocalendar($user,$config['EMAIL'],$config['PASS'],$otherconfig[GLOBALGWACCOUNT]); $address2 = getaddresseslite($id,false); $sessid = logtocalendar($user,$config['EMAIL'],$config['PASS'],1); $address1 = getaddresseslite($id); if($sessid) $calsettings=loadcalendarsettings($cal_default,"a","0"); else $DBcalendar=0; } else{ $address1 = getaddresseslite($id); $address2 = getaddresseslite($id,false); } if($groupname) { unset($groupDBID); $Gstring=getgrouplist($id, $groupname,!$global); $addressG=explode(';',$Gstring); if($groupDBID) { $result= parsecalendarresult(calendarfunctioncall("GetContactDetailList",$groupsessid,'(ITMCLASS=\'L\' AND ITM_ID=\''.$groupDBID.'\')','ITMSHARETYPE')); $group['sharing']= $result[0]['ITMSHARETYPE']; } } elseif($global) $group['sharing']='U'; else $group['sharing']='P'; if($global) { if($cal_access&2) { if($config["ADMIN"]) { $saveAS= 0; //DB+text $readonly= ""; } elseif($groupDBID || !isset($groupname)) { $saveAS= 1; //DB $readonly= ""; } } elseif($config["ADMIN"] && !$groupDBID)// || !isset($groupname)) { $saveAS= 2; //text $readonly= ""; } } function makejsarray($arr) { $i=0; if(!is_array($arr)) return; $line = ''; foreach($arr as $v){ unset($a); $v = trim($v); if ($v=='') continue; ereg("([a-zA-Z0-9\.\_\-]+)@([a-zA-Z0-9\.\-]+\.[A-Za-z]{2,4})",$v,$a); //email is present if ($a[0]){ $m = $a[0]; $t = trim(ereg_replace("[<>\"\r\n ]",'',substr($v,0,strpos($v,$m)))); } //email is not present else{ // if(($p1 = strpos($v,"<"))>-1 && ($p2 = strpos($v,">"))>-1 && $p1<$p2){ $t = trim(substr($v,0,$p1)); $m = str_replace(" ","_",trim(substr($v,$p1+1,$p2-$p1-1))); } //text... else{ //$t = $v; $t = ''; $m = str_replace(" ","_",$v); } $t = ereg_replace("[<>\"\r\n]+","",$t); $m = ereg_replace("[<>\"\r\n]+","",$m); } if(!$t && !$m) continue; $line.='"'.addslashes($t.($m?($t?" <$m>":"<$m>"):''))."\",\r\n"; } return substr(trim($line),0,-1); } $createdata .= ' '.$lang['MSG_GROUPS'].' '.($readonly?'':'').' '.$lang['MSG_GROUPNAME'].' '.(!$readonly?'':"$groupname").' '.$lang['MSG_LINKS_PRIVATE_BOOK'].' '.$lang['MSG_GROUPCONTAINS'].' '.$lang['MSG_ADDOTHERCONTACT'].' '.$lang[MSG_LINKS_GLOBAL_BOOK].' '; if($DBcalendar && !$saveAS) { $createdata .= ' '.$lang[MSG_SAVEAS].' '.$lang["MSG_DB"].' '.$lang["MSG_TXTFILE"].' '.$callang['CAL_SHARING'].' '.$callang["CAL_PRIVATE"].' '.$callang["CAL_PUBLIC"].' '.$callang[CAL_ACCOUNTSHARING].' '.$SharingOption.' '; } elseif($DBcalendar && ($saveAS==0 || $saveAS==1)) $createdata .= ''; $createdata .= ' '.($readonly?'':'').' '; $skindata['data'] = $createdata; //vypsani stranky if($showlite) echo template( $skin_dir . 'blank.tpl', $skindata); else echo template( $skin_dir . 'skin.tpl', $skindata); ?>