Skip to content

Commit

Permalink
Bulk commit;
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket Agarwal committed May 5, 2012
1 parent d590280 commit 2ca2529
Show file tree
Hide file tree
Showing 20 changed files with 454 additions and 248 deletions.
2 changes: 1 addition & 1 deletion application/config/config.php
Expand Up @@ -14,7 +14,7 @@
| path to your installation.
|
*/
$config['base_url'] = 'http://10.102.43.64/';
$config['base_url'] = 'http://localhost/';

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion application/config/config.php~
Expand Up @@ -14,7 +14,7 @@
| path to your installation.
|
*/
$config['base_url'] = 'http://localhost/';
$config['base_url'] = 'http://http://10.102.43.64/';

/*
|--------------------------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions application/controllers/activities.php~
Expand Up @@ -4,17 +4,18 @@ class Activities extends CI_Controller {
public function __construct()
{
parent::__construct();
//$this->load->model('news_model');
$this->load->model('event_model');
}

public function index()
{

$data['title'] = 'Home Page';
$data['title'] = "Home Page";
$data['event_list'] = $this->event_model->get_events();

$this->load->helper('url');
$this->load->view('header', $data);
$this->load->view('contacts', $data);
$this->load->view('activities', $data);
//$this->load->view('templates/footer');
}
}
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/home.php
Expand Up @@ -14,7 +14,7 @@ public function index()
//$data['news'] = array_splice($this->news_model->get_news(),1);
$data['news'] = $this->news_model->get_home_news();
$data['pub_list'] = array_splice($this->pub_model->get_latest_pub(),0,2);
$data['event_list'] = $this->event_model->get_events();
$data['event_list'] = $this->event_model->get_home_events();

$data['title'] = 'Home Page';

Expand Down
4 changes: 2 additions & 2 deletions application/controllers/home.php~
Expand Up @@ -12,9 +12,9 @@ class Home extends CI_Controller {
public function index()
{
//$data['news'] = array_splice($this->news_model->get_news(),1);
$data['news'] = $this->news_model->get_news();
$data['news'] = $this->news_model->get_home_news();
$data['pub_list'] = array_splice($this->pub_model->get_latest_pub(),0,2);
$data['event_list'] = $this->event_model->get_events();
$data['event_list'] = $this->event_model->get_home_events();

$data['title'] = 'Home Page';

Expand Down
25 changes: 23 additions & 2 deletions application/models/event_model.php
Expand Up @@ -10,11 +10,32 @@ public function get_events()
{
$this->db->select('*');

$this->db->order_by('when,time', 'desc');
$this->db->order_by('when', 'desc');
$query = $this->db->get('events');

return $query->result_array();

}
}

public function get_home_events($base_size = 5){

/* Select those events which have home tag ticked on */
/* We assume that we require 5 events in total, hence pick rest from latest-events */

$this->db->from('events');
$this->db->order_by('when','desc');
$this->db->where('choose_home','YES');
$events_major = array_splice($this->db->get()->result_array(),0,4);
$rem = $base_size - sizeof($events_major);
if($rem > 0){
$this->db->from('events');
$this->db->where('choose_home','NO');
$this->db->order_by('when','desc');
$events_latest = array_splice($this->db->get()->result_array(),0,$rem);
$events_major = array_merge($events_major, $events_latest);
}
return $events_major;
}

}
?>
25 changes: 23 additions & 2 deletions application/models/event_model.php~
Expand Up @@ -10,11 +10,32 @@ class Event_model extends CI_Model {
{
$this->db->select('*');

$this->db->order_by('date,time', 'desc');
$this->db->order_by('when', 'desc');
$query = $this->db->get('events');

return $query->result_array();

}
}

public function get_home_events($base_size = 5){

/* Select those events which have home tag ticked on */
/* We assume that we require 5 events in total, hence pick rest from latest-events */

$this->db->from('events');
$this->db->order_by('when','desc');
$this->db->where('choose_home','YES');
$events_major = array_splice($this->db->get()->result_array(),0,4);
$rem = $base_size - sizeof($events_major);
if($rem > 0){
$this->db->from('events');
$this->db->where('choose_home','NO');
$this->db->order_by('when','desc');
$events_latest = array_splice($this->db->get()->result_array(),0,$rem);
$events_major = array_merge($events_major, $events_latest);
}
return $events_major;
}

}
?>
12 changes: 5 additions & 7 deletions application/models/news_model.php
Expand Up @@ -6,27 +6,25 @@ public function __construct()
$this->load->database();
}

public function get_news($slug = FALSE)
public function get_news()
{
if ($slug === FALSE)
{
$this->db->order_by('date','desc');
$query = $this->db->get('news');
return $query->result_array();
}

$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}

public function get_home_news($base_size = 5){
/* Select those news which have home tag ticked on */
/* We assume that we require 5 news in total, hence pick rest from latest-news */
$this->db->from('news');
$this->db->order_by('date','desc');
$this->db->where('choose_home','YES');
$news_major = array_splice($this->db->get()->result_array(),0,4);
$rem = $base_size - sizeof($news_major);
if($rem > 0){
$this->db->from('news');
$this->db->where('choose_home','NO');
$this->db->order_by('date','desc');
$news_latest = array_splice($this->db->get()->result_array(),0,$rem);
$news_major = array_merge($news_major, $news_latest);
}
Expand Down
14 changes: 6 additions & 8 deletions application/models/news_model.php~
Expand Up @@ -6,29 +6,27 @@ class News_model extends CI_Model {
$this->load->database();
}

public function get_news($slug = FALSE)
public function get_news()
{
if ($slug === FALSE)
{
$this->db->order_by('date','desc');
$query = $this->db->get('news');
return $query->result_array();
}

$query = $this->db->get_where('news', array('slug' => $slug));
return $query->row_array();
}

public function get_home_news($base_size = 5){
/* Select those news which have home tag ticked on */
/* We assume that we require 5 news in total, hence pick rest from latest-news */
$this->db->from('news');
$this->db->order_by('date','desc');
$this->db->where('choose_home','YES');
$news_major = array_splice($this->db->get()->result_array(),0,4);
$rem = $base_size - sizeof($news_major);
if($rem > 0){
$this->db->from('news');
$this->db->where('choose_home','NO');
$this->db->order_by('when','desc');
$news_latest = array_splice($this->db->get()->result_array(),0,$rem);
//$news_major = array.concat($news_major, $news_latest);
$news_major = array_merge($news_major, $news_latest);
}
return $news_major;
}
Expand Down
9 changes: 0 additions & 9 deletions application/views/about.php~
Expand Up @@ -23,15 +23,6 @@
<div style="height: 20px; overflow: hidden; width: 100%;"></div></div>


<div ><div class="wsite-multicol"><div style='padding-right:1.2%'><div class='wsite-multicol-table-wrap' style='margin:0 -5px'><table class='wsite-multicol-table'><tbody class='wsite-multicol-tbody'><tr class='wsite-multicol-tr'><td class='wsite-multicol-col' style='width:32.64611011236%;padding:0 5px'><div ><div style="text-align: center;"><a><img src="/uploads/6/7/8/7/6787877/_1305133475.jpg" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0; margin-right: 0; border-width:1px;padding:3px;" alt="Picture" class="galleryImageBorderBlack" /></a><div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;">Conversation in online social networks</div></div></div>

</td><td class='wsite-multicol-col' style='width:66.353975280899%;padding:0 5px'><div ><div class="wsite-multicol"><div style='padding-right:1.2%'><div class='wsite-multicol-table-wrap' style='margin:0 -5px'><table class='wsite-multicol-table'><tbody class='wsite-multicol-tbody'><tr class='wsite-multicol-tr'><td class='wsite-multicol-col' style='width:49.5%;padding:0 5px'><div ><div style="text-align: center;"><a><img src="/uploads/6/7/8/7/6787877/_2090773.jpg" style="margin-top: 10px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; border-width:1px;padding:3px;" alt="Picture" class="galleryImageBorderBlack" /></a><div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;">EpiC: A Computational Infrastructure for Epidemics Research</div></div></div>

</td><td class='wsite-multicol-col' style='width:49.5%;padding:0 5px'><div ><div style="text-align: center;"><a><img src="/uploads/6/7/8/7/6787877/_3753829.jpg?230" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0; margin-right: 0; border-width:1px;padding:3px;" alt="Picture" class="galleryImageBorderBlack" /></a><div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;">Global Epidemic and mobility model</div></div></div>

</td></tr></tbody></table></div></div></div></div>

</td></tr></tbody></table></div></div></div></div>

</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions application/views/activities.php
Expand Up @@ -43,6 +43,8 @@

</table>
</div>


<div id="content">
<div id="wsite-content" class="wsite-not-footer">
<div class="wsite-not-footer">
Expand All @@ -54,9 +56,8 @@
<div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;"></div></div></div>

</td><td class="wsite-multicol-col" style="padding:0 15px">

<div><a>
<img src='<?php echo base_url()."/cnerg/images/talks.jpg"?>' style="margin-top: 10px; margin-bottom: 10px; margin-left: 0; margin-right: 0; padding:6px;width:100%;height:30px;" alt="Picture" class="galleryImageBorderBlack"></a><div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;"></div></div></div>
<h3>Events and talks</h3>
<br />
<div>
<?php foreach($event_list as $event): ?>

Expand Down
87 changes: 58 additions & 29 deletions application/views/activities.php~
@@ -1,27 +1,50 @@






<!--div id="content">
<div id="wsite-content" class="wsite-not-footer">
<div class="wsite-not-footer">
<h2 style=" text-align: left; ">Activities</h2>

<iframe src="https://www.google.com/calendar/embed?src=snktagarwal%40gmail.com&ctz=Asia/Calcutta" style="border: 0;" width="800" height="400" frameborder="0" scrolling="no"></iframe>

<div><div style="height: 20px; overflow: hidden; width: 100%;"></div>
<hr class="styled-hr" style="width:100%;">
<div style="height: 20px; overflow: hidden; width: 100%;"></div></div>



</div>
</div>
<div class="clear" style="padding-bottom: 30px"></div>
</div-->

<div id="navigation">
<table>
<tr>
<td width="72%">
<ul>
<li style="position: relative; ">
<a href="home" style="position: relative; ">Home</a>
</li>
<li id="pg873600280878711087" style="position: relative; ">
<a href="about" style="position: relative; ">About</a>
</li>
<li id="pg849208609319064705" style="position: relative; ">
<a href="projects" style="position: relative; ">Projects</a>
</li>
<li id="pg289405349604947483" style="position: relative; ">
<a href="publications1" style="position: relative; ">Publications</a>
</li>
<li id="pg604785984957670984" style="position: relative; ">
<a href="courses" style="position: relative; ">Courses</a>
</li>
<li id="pg513741096409430388" style="position: relative; ">
<a href="people" style="position: relative; ">People</a>
</li>
<li id="pg328664862367688996" style="position: relative; ">
<a href="news" style="position: relative; ">News</a>
</li>
<li id="active" style="position: relative; ">
<a href="activities" style="position: relative; ">Activities</a>
</li>
</ul>

</td>
<td width="17%">

<div class="fb-like" data-href="https://www.facebook.com/pages/CNeRG/122322841226800" data-send="true" data-layout="button_count" data-width="50" data-show-faces="true"></div>

</td>
<td width="11%">
<a href="https://twitter.com/CNeRGIITKgp" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @CNeRGIITKgp</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</td>
</tr>

</table>
</div>


<div id="content">
<div id="wsite-content" class="wsite-not-footer">
<div class="wsite-not-footer">
Expand All @@ -33,12 +56,18 @@
<div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;"></div></div></div>

</td><td class="wsite-multicol-col" style="padding:0 15px">

<div><a>
<img src='<?php echo base_url()."/cnerg/images/latnews.jpg"?>' style="margin-top: 10px; margin-bottom: 10px; margin-left: 0; margin-right: 0; padding:6px;width:100%;height:30px;" alt="Picture" class="galleryImageBorderBlack"></a><div style="display: block; font-size: 90%; margin-top: -10px; margin-bottom: 10px;"></div></div></div>
<h3>Events and talks</h3>
<div>
<li>This is a test bullet 1 </li>
<li>This is a test bullet 2 </li>
<?php foreach($event_list as $event): ?>

<h5><?php echo $event["name"]; ?></h5>
<div class="paragraph editable-text" style=" text-align: left; ">
<strong>Venue: </strong><?php echo $event["where"]; ?> <br />
<strong>Date: </strong><?php echo $event["time"].", ".$event["when"] ?> <br />
</div>

<?php endforeach ?> <!-- Event and talks list ends -->

</div>

</td></tr></tbody></table></div></div></div>
Expand Down
49 changes: 48 additions & 1 deletion application/views/courses.php~
@@ -1,3 +1,50 @@

<div id="navigation">
<table>
<tr>
<td width="72%">
<ul>
<li style="position: relative; ">
<a href="home" style="position: relative; ">Home</a>
</li>
<li id="pg873600280878711087" style="position: relative; ">
<a href="about" style="position: relative; ">About</a>
</li>
<li id="pg849208609319064705" style="position: relative; ">
<a href="projects" style="position: relative; ">Projects</a>
</li>
<li id="pg289405349604947483" style="position: relative; ">
<a href="publications1" style="position: relative; ">Publications</a>
</li>
<li id="pg604785984957670984" style="position: relative; ">
<a href="courses" style="position: relative; ">Courses</a>
</li>
<li id="pg513741096409430388" style="position: relative; ">
<a href="people" style="position: relative; ">People</a>
</li>
<li id="pg328664862367688996" style="position: relative; ">
<a href="news" style="position: relative; ">News</a>
</li>
<li id="pg667435914845654009" style="position: relative; ">
<a href="activities" style="position: relative; ">Activities</a>
</li>
</ul>

</td>
<td width="17%">

<div class="fb-like" data-href="https://www.facebook.com/pages/CNeRG/122322841226800" data-send="true" data-layout="button_count" data-width="50" data-show-faces="true"></div>

</td>
<td width="11%">
<a href="https://twitter.com/CNeRGIITKgp" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @CNeRGIITKgp</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</td>
</tr>

</table>
</div>

<div id="content">
<div id='wsite-content' class='wsite-not-footer'>
<div class='wsite-not-footer'>
Expand All @@ -9,7 +56,7 @@
<h2 style = "padding-top:10px" ><b> <?php echo $course['name'] ?></b></h2>
<a href='<?php echo $course["faculty_page"]?>' style = "padding-top:10px" > <b>Faculty: </b><?php echo $course['faculty'] ?></a>
<p style="padding-top:20px;"><?php echo $course['description'] ?></p>
<p style = "padding-top:10px" > <b>Course page: </b><?php echo $course['course_page'] ?></p>
<p style = "padding-top:10px" > <b>Course page: </b><a href='<?php echo $course["course_page"] ?>' ><?php echo $course['course_page'] ?></a></p>
<br />
</div>

Expand Down

0 comments on commit 2ca2529

Please sign in to comment.