EliteConf
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
test
protected
controllers
ViewpaperController.php
Go to the documentation of this file.
1
<?php
2
3
class
ViewpaperController
extends
Controller
4
{
5
public
function
actionIndex
()
6
{
7
$this->render(
'index'
);
8
}
9
10
11
public
function
viewPaper
()
12
{
13
14
// Connect_DatabaseController::connect();
15
// Yii::app()->db;
16
/*$con = mysql_connect("localhost","root","");
17
if (!$con)
18
{
19
die('Could not connect: ' . mysql_error());
20
}
21
22
mysql_select_db("yii_tour", $con); */
23
24
25
26
//conferenceid = 34 (will be provided when the user clicks "view conference" button
27
$papid
= $_GET[
'va'
];
28
29
30
//view the properties of a conference
31
$result
= mysql_query(
"SELECT * FROM paper WHERE id=$papid"
);
32
while
($row = mysql_fetch_array(
$result
))
33
{
34
echo
"<B>PROPERTIES OF "
. $row[
'paper_name'
] .
"</B>"
;
35
echo
"<br />"
;
36
echo
"<br />"
;
37
echo
"Paper ID : "
. $row[
'id'
];
38
echo
"<br />"
;
39
echo
"Paper Name : "
. $row[
'paper_name'
];
40
echo
"<br />"
;
41
echo
"Paper Size : "
. $row[
'paper_size'
];
42
echo
"<br />"
;
43
echo
"Author Name : "
. $row[
'author_name'
];
44
echo
"<br />"
;
45
46
if
($row[
'rating'
]==NULL){
47
echo
"Rating : Not Rated Yet"
;}
48
else
{
49
echo
"Rating : "
. $row[
'rating'
];}
50
echo
"<br />"
;
51
echo
"<br />"
;
52
53
$co
= $row[
'paper_name'
];
54
echo
"<a href=\" ./index.php?r=downloadPaper&paper=$co\">Download Paper </a>"
;
55
56
}
57
58
echo
"<br />"
;
59
60
61
//mysql_close($con);
62
63
64
}
65
66
67
68
// Uncomment the following methods and override them if needed
69
/*
70
public function filters()
71
{
72
// return the filter configuration for this controller, e.g.:
73
return array(
74
'inlineFilterName',
75
array(
76
'class'=>'path.to.FilterClass',
77
'propertyName'=>'propertyValue',
78
),
79
);
80
}
81
82
public function actions()
83
{
84
// return external action classes, e.g.:
85
return array(
86
'action1'=>'path.to.ActionClass',
87
'action2'=>array(
88
'class'=>'path.to.AnotherActionClass',
89
'propertyName'=>'propertyValue',
90
),
91
);
92
}
93
*/
94
}
Generated on Sun Jun 2 2013 05:35:38 for EliteConf by
1.8.4