EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
view.php
Go to the documentation of this file.
1 <?php
2 /* @var $this PaperController */
3 /* @var $model Paper */
4 
13 $this->breadcrumbs=array(
14  'Papers'=>array('index'),
15  $model->id,
16 );
17 
18 $this->menu=array(
19  array('label'=>'List Paper', 'url'=>array('index')),
20  array('label'=>'Create Paper', 'url'=>array('create')),
21  array('label'=>'Update Paper', 'url'=>array('update', 'id'=>$model->id)),
22  array('label'=>'Delete Paper', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
23  array('label'=>'Manage Paper', 'url'=>array('admin')),
24 );
25 ?>
26 
27 <h1>View Paper "<?php echo $model->name; ?>"</h1>
28 <?php $paperid = $model->id; ?>
29 <?php $this->widget('zii.widgets.CDetailView', array(
30  'data'=>$model,
31  'attributes'=>array(
32  'id',
33  'paper_name',
34  'paper_size',
35  'author_id',
36  'author_name',
37  'type',
38  'rating',
39  ),
40 )); ?>
41 
42 <br>
43 <?php echo CHtml::link("Download Abstract", array(
44  'download', 'id'=>$model->id)) . "<br>"; ?>
45 
46 <?php
47 
49 
50 if(Yii::app()->user->id != NULL)
51  $usid = Yii::app()->user->id;
52 else
53  $usid = 0;
54 
55 $view = 0;
56 $isref = mysql_query("SELECT * FROM paper_referee WHERE paperid=$model->id AND userid=$usid");
57 if(mysql_num_rows($isref)!=0) $view++;
58 
59 $isauth = mysql_query("SELECT * FROM paper_author WHERE paperid=$model->id AND userid=$usid");
60 if(mysql_num_rows($isauth)!=0) $view++;
61 
62 $isad = mysql_query("SELECT * FROM conference_user_type WHERE userid=$usid AND usertype=1 AND conferenceid IN
63  (SELECT conferenceid FROM conference_paper WHERE paperid=$model->id)");
64 if(mysql_num_rows($isad)!=0) $view++;
65 
66 $firstdraft = mysql_query("SELECT * FROM paper WHERE id IN
67  (SELECT firstid FROM paper_abstact_first WHERE abstractid=$model->id)");
68 if(mysql_num_rows($firstdraft)!=0 && $view!=0)
69 {
70 while($row = mysql_fetch_array($firstdraft))
71 {
72  $firstid = $row['id'];
73 
74 }
75 
76 echo CHtml::link("Download First Draft", array(
77  'download', 'id'=>$firstid)) . "<br>";
78 }
79 ?>
80 
81 
82 <?php
83 
85 
86 $finalmanu = mysql_query("SELECT * FROM paper WHERE id IN
87  (SELECT finalid FROM paper_first_final WHERE firstid=$model->id)");
88 
89 if(mysql_num_rows($finalmanu)!=0 && $view!=0)
90 {
91 while($row = mysql_fetch_array($finalmanu))
92 {
93  $finalid = $row['id'];
94 
95 }
96 
97 echo CHtml::link("Download Final Manuscript", array(
98  'download', 'id'=>$finalid));
99 }
100 ?>
101 
102 <script type="text/javascript">
103 <!--
104  function toggle_visibility(id) {
105  var e = document.getElementById(id);
106  if(e.style.display === 'block')
107  e.style.display = 'none';
108  else
109  e.style.display = 'block';
110  }
111 //-->
112 </script>
113 
114 <br><br>
115 
116 
117 
118 
119 <a href="#" style="text-decoration: none" onclick=" toggle_visibility('evaluations'); return false;">
120 <h3>Evaluations On This Paper</h3>
121 </a>
122 <div id="evaluations" style="display:none">
123 <?php
124 //view administering conferences
125 
126 $this->view_evaluation($paperid);
127 
128 ?>
129 </div>
130 
131 
132 <br>
133 <a href="#" style="text-decoration: none" onclick=" toggle_visibility('comments'); return false;">
134 <h3>Comments On This Paper</h3>
135 </a>
136 <div id="comments" style="display:none">
137 <?php
138 //view administering conferences
139 
140 $this->comments($paperid);
141 
142 ?>
143 </div>
144 
145 <br>
146 
147 <a href="#" style="text-decoration: none" onclick="toggle_visibility('topics'); return false;">
148 <h3>Topics of This Paper</h3>
149 </a>
150 <div id="topics" style="display:none";>
151 <?php
152 // VIEW CONFERENCE USERS
153 
154 $this->viewTopics($model->id);
155 
156 ?>
157 </div>
158 
159 <?php
160 
161 echo "<br/>";
162 ?>
163 
164 
165 <a href="#" <?php $this->isAdmin(); ?> style="text-decoration: none" onclick="toggle_visibility('adminfunctions'); return false;">
166 <h3>Administrative Functions</h3>
167 </a>
168 <div id="adminfunctions" style="display:none";>
169 <?php
170 $this->adminFunctions();
171 ?>
172 <br>
173 </div>
174 
175 <div <?php $this->isAdmin(); ?>>
176 <br>
177 </div>
178 
179 <a href="#" <?php $this->isAuthor(); ?> style="text-decoration: none" onclick="toggle_visibility('authorfunctions'); return false;">
180 <h3>Authoring Functions</h3>
181 </a>
182 <div id="authorfunctions" style="display:none";>
183 <?php
184 $this->authorFunctions();
185 ?>
186 <br>
187 </div>
188 
189 <div <?php $this->isAuthor(); ?>>
190 <br>
191 </div>
192 
193 <a href="#" <?php $this->isReferee(); ?> style="text-decoration: none" onclick="toggle_visibility('refereefunctions'); return false;">
194 <h3>Refereeing Functions</h3>
195 </a>
196 <div id="refereefunctions" style="display:none";>
197 <?php
198 $this->refereeFunctions();
199 ?>
200 <br>
201 </div>
202 
203 <div <?php $this->isReferee(); ?>>
204 <br>
205 </div>