Item_Visits($id); } include('inc/head_html.php'); $navbar[1]=array('name'=>'Journal of Discovery','href'=>$servername.'journal/user_'.@$_GET['user_title'].'_'.@$_GET['user_id'].'/view_'.@$_GET['viewby'].''); $k=2; if(!empty($user_id)){ $navbar[2]=array('name'=>$_GET['user_title']); $k++; } if(!empty($_GET['date'])){ $datenav=explode('-',$_GET['date']); $navbar[$k]=array('name'=>"$datenav[2].$datenav[1].$datenav[0]"); $k++; } if(@$_GET['viewby']=='topics'){ $navbar[$k]=array('name'=>$_GET['user_title']); $k++; } if(!empty($id)){ $navbar[$k]=array('name'=>$_GET['title'],'href'=>''); $k++; } $user->Nav_Bar($navbar); if(!empty($id)){ $JournalID=$journal->Get_Item($id,0); }else{ $viewby=(!empty($_GET['viewby']) && eregi('^(date|topics)$',$_GET['viewby']))?$_GET['viewby']:'date'; if(!empty($topic_id))$viewby='topics'; if(!empty($user_id)){ echo ' '; } if($viewby=='date'){ $cur_month=(!empty($_GET['cur_month']))?$_GET['cur_month']:date('m'); $cur_year=(!empty($_GET['cur_year']))?$_GET['cur_year']:date('Y'); if(!empty($_GET['cur_month']))$date="$cur_year-$cur_month-01"; if(empty($_GET['cur_month']) && !empty($date)){ $datee=explode('-',$date); $cur_year=$datee[0]; $cur_month=$datee[1]; } echo '
'; $href=$servername.$localfile.'/user_'.@$_GET['user_title'].'_'.@$_GET['user_id']; echo '
'; $from_date="$cur_year-".$cur_month."-01"; $to_date="$cur_year-".$cur_month."-31"; $journal->Get_Journal_Dates($user_id,$from_date,$to_date); $month=date("$cur_year-$cur_month-01"); $month=new month($month,$href); $month->monthdisplay(); echo '
'; echo '
'; if(!empty($_GET['q']) && !empty($_GET['where_q'])){ $_POST['formID']='search'; $_POST['search']['q']=$_GET['q']; $_POST['search']['where_q']=$_GET['where_q']; } if(!empty($_POST['formID']) && $_POST['formID']=='search'){ $ins=new db_insert('search'); $ins->commit(0); if(empty($err)){ $date=''; $q=$_POST['search']['q']; $where_q=$_POST['search']['where_q']; switch($where_q){ case 'alias': $search_in_array=array('u.alias'); break; case 'filling_topic': $search_in_array=array('s.name'); break; case 'topic': $search_in_array=array('t.title'); break; case 'text': $search_in_array=array('j.title','j.text'); break; default: $search_in_array=array('u.alias'); break; } $search=new search($q,$search_in_array); $where_search=$search->build_query_search(); } } $form=new form('search','Journal search','post'); $form->open(); $form->id(); //$form->dbselect('filling_topic_id','Filling Topic','» Select Filling Topic',"select id,name from system where type_id='2' order by name"); $form->text('q','Enter keywords',1); $form->select('where_q','Where to Search','',array('alias'=>'Author','filling_topic'=>'Filling Topic','topic'=>'Sub Topic','text'=>'Text')); $form->submit('Search'); $form->close(); echo '
'; echo '
'; echo '
Full Archive
'; echo '
'; $journal->Get_Journal($user_id,$date); }else{ if(empty($topic_id)){ $journal->Get_Journal_Topics($_SESSION['user_id']); }else{ $journal->Get_Journal($user_id,'',0,$topic_id); } } } include('inc/footer.php'); ?>