function printSiteList($studentId) { if ($studentId == 0) { // Grabbing 10 random students $students = queryGetRandomStudents(); // See this method to chnage the number of random students // Printing Site link for each student foreach ($students as $student) { ?> <tr> <td> <a href="<?php echo getSiteLink($student['id']); ?> "><?php echo "- " . queryGetStudentName($student['id']); ?> </a> </td> </tr> <?php } } else { // Printing personal site link ?> <tr> <td> <a href="<?php echo getSiteLink($studentId); ?> "><?php echo "- " . queryGetStudentName($studentId); ?> </a> </td> </tr> <?php // Grabbing students in users group $students = queryGetGroupMembers(queryGetGroupId($studentId)); // Printing Site link for each student foreach ($students as $student) { // Making sure the users site isnt printed if ($student['id'] != $studentId) { ?> <tr> <td> <a href="<?php echo getSiteLink($student['id']); ?> "><?php echo "- " . queryGetStudentName($student['id']); ?> </a> </td> </tr> <?php } } } }
if ($dataRow['trip03banner1']) { echo $dataRow['trip03banner1']; } else { echo 'default.jpg'; } ?> " /> </div> <div class="imgText"> <span class="fontMedium"> <?php echo $dataRow['trip03title']; ?> </span><br /> <a class="fontSmall" href="<?php echo getSiteLink('trips', '', '', $dataRow['trip03uin'], '', $dataRow['trip03title']); ?> "> read more </a> </div> <?php } ?> <?php //endif; ?>
<?php //var_dump( get_browser()); $id = getREQUEST('_Id'); if (!$id) { $url = getSiteLink('home'); //echo $url; forceRedirect($url); } //$objCat= new NewsType(); $obj = new FromPaper(); //$objHitCounter= new HitCounter(); //$ip=$_SERVER['REMOTE_ADDR']; $list = $obj->getById($id); $data['title'] = 'पत्रपत्रिका बाट'; $data['data'] = $list; echo defaultModule($strModuleName, $data);
<?php echo LoadMyImage($uploadUrl, $row[$prefix . 'file'], $row[$prefix . 'title'], 'img-responsive'); ?> <div class="shadow"> <h5><a href="<?php echo getSiteLink('NewsArticle', '', $row[$prefix . 'title'], $row[$prefix . 'uin']); ?> "> <?php echo $row[$prefix . 'title']; ?> </a></h5> <p class="bg2"><?php echo clipMyText($row[$prefix . 'detail'], 500); ?> </p> <a class="" href="<?php echo getSiteLink('NewsArticle', '', $row[$prefix . 'title'], $row[$prefix . 'uin']); ?> ">Read More..</a> </div> </div> <?php } ?> <div class="clearfix"></div>
function getSubModule($module) { if (substr($module, 0, strlen('adversitse')) == 'adversitse') { include_once TPL . 'includes/ad' . substr($module, -1) . '.php'; return; } elseif ($module == 'frompaper') { include_once TPL . 'includes/from_paper.php'; return; } $objType = new NewsType(); $cat_datas = $objType->getByModuleName($module); if ($cat_datas->rowCount() < 1) { return; } $cat_data = ''; $id = 0; foreach ($cat_datas as $row) { $id = $row['news01uin']; $cat_data = $row; } $objNews = new News(); $data = $objNews->getByType($id, 1, 5); //$data1=$objNews->getByType($id,2,5); $prefix = 'news02'; ?> <header class="heading"> <a href="<?php echo getSiteLink('News', '', '', $cat_data['news01' . 'uin'], $cat_data['news01' . 'title']); ?> " class="more">बाँकी अंश</a> <h2><?php echo $cat_data['news01' . 'title']; ?> </h2> </header> </header> <div class="content-holder"> <?php $lists = ''; ?> <?php $ct = 0; foreach ($data as $row) { ?> <?php if ($ct < 2) { ?> <article class="photo-news"> <img src="uploads/news/<?php echo $row['news02file']; ?> " alt="img1"> <h3><a href="<?php echo getSiteLink('NewsArticle', '', $row[$prefix . 'title'], $row[$prefix . 'uin']); ?> "><?php echo $row['news02title']; ?> </a></h3> <p><?php $shortTry = substr($row['news02shortDesc'], 0, 300); echo substr($shortTry, 0, strrpos($shortTry, ' ', -1)); ?> </article> <?php } else { ?> <?php $lists .= '<li><a href="' . getSiteLink('NewsArticle', '', $row[$prefix . 'title'], $row[$prefix . 'uin']) . '">' . $row['news02title'] . '</a></li>'; ?> <?php } ?> <?php $ct++; } ?> <?php echo '<ul>' . $lists . '</ul>'; ?> </div> <?php }
function BuildMenu($parentId, $ParentName = '') { //$menu=''; $ObjMenu = new NewsType(); $MenuPrefix = $ObjMenu->getPrefix(); $_result = $ObjMenu->get(array('parent' => $parentId, 'menu' => 0)); //var_dump($_result); $_class = ''; if (count($_result) < 1) { return; } else { //var_dump(count($_result)); } $ulclass = '"" '; $exAttr = ''; if ($parentId < 1) { $ulclass = 'nav navbar-nav'; } else { $ulclass = 'dropdown-menu'; $exAttr = 'role="menu"'; } // echo '<ul class="' . $ulclass . '" ' . $exAttr . '>'; foreach ($_result as $menuItem) { //var_dump($menuItem); $class = ''; if (isset($_GET['page'])) { $curr_module = substr($_GET['page'], 0, strlen($menuItem[$MenuPrefix . 'module'])); //echo $curr_module.$menuItem[$MenuPrefix.'module']; } else { $curr_module = 'home'; } if (strtolower($curr_module) == strtolower($menuItem[$MenuPrefix . 'module'])) { $class = 'active'; } if ($class != '') { //echo $curr_module; } //echo $class; //var_dump($_row); $url = ''; if ($menuItem[$MenuPrefix . 'url'] == "0" || $menuItem[$MenuPrefix . 'url'] == '') { $url = ''; } elseif ($menuItem[$MenuPrefix . 'hasChild'] == '0') { $url = $menuItem[$MenuPrefix . 'module']; } elseif ($menuItem[$MenuPrefix . 'url'] == 1) { $url = 'ActivityList'; } elseif ($menuItem[$MenuPrefix . 'url']) { $url = $menuItem[$MenuPrefix . 'url']; } $exAttr = ''; if ($menuItem[$MenuPrefix . 'hasChild']) { $class .= ' dropdown'; $exAttr = 'class = "dropdown-toggle" data-toggle="dropdown"'; } //if($parentId>0) echo '<li class="' . $class . '" >'; echo '<a ' . $exAttr . ' href="'; if ($url == 'ActivityList') { echo getSiteLink($url, '', '', $menuItem[$MenuPrefix . 'uin'], $menuItem[$MenuPrefix . 'title']); } else { echo getSiteLink($url, ''); //echo getSiteLink($url,'',$menuItem[$MenuPrefix,'uin'],$menuItem[$MenuPrefix.'title']); } echo '" title="' . $menuItem[$MenuPrefix . 'title' . $_SESSION['lang_type']] . '">'; if ($menuItem[$MenuPrefix . 'module'] == 'home') { echo '<span class="fa fa-home fa-fw"></span>'; } else { echo $menuItem[$MenuPrefix . 'title' . $_SESSION['lang_type']]; if ($menuItem[$MenuPrefix . 'hasChild'] == 1) { echo '<span class="caret"></span>'; } } echo '</a>'; //$objSub= new NewsType(); if ($menuItem[$MenuPrefix . 'hasChild']) { $datasubMenu = $ObjMenu->getByParent($menuItem[$MenuPrefix . 'uin']); if (count($datasubMenu) > 0) { //echo $menuItem[$MenuPrefix.'uin'].' '.$menuItem[$MenuPrefix.'module']; BuildMenu($menuItem[$MenuPrefix . 'uin'], $menuItem[$MenuPrefix . 'module']); } } echo '</li>'; } echo '</ul>'; //return $menu; }
echo $uploadUrl . $row[$prefix . 'file']; ?> " class="img-responsive" alt="<?php echo $row[$prefix . 'title' . $_SESSION['lang_type']]; ?> "> <div class="shadow"> <h5><a href="<?php echo getSiteLink($moduleName, '', $row[$prefix . 'title'], $row[$prefix . 'uin']); ?> "> <?php echo clipMyText($row[$prefix . 'detail'], 500); ?> </a></h5> <p class="bg2"><?php echo $row[$prefix . 'title' . $_SESSION['lang_type']]; ?> </p> <a class="" href="<?php echo getSiteLink($moduleName, '', $row[$prefix . 'title'], $row[$prefix . 'uin']); ?> ">Read More..</a> </div> </div> <?php } ?> <div class="clearfix"></div>
printPrivateResourceForm(); printEditPrivateResourceForm(); ?> </div> </div> <?php // Print loginbuttom if user isnt logged in if ($student->isPublic) { ?> <span class="login-button login-button-container" onclick="openHiddenDiv('loginform')">Logga in</span><?php } else { ?> <span class="login-button-container"> <a href="<?php echo getSiteLink($student->studentId); ?> "><span class="login-button">Min sida</span></a> <a href="logout.php"><span class="login-button">Logga ut</span></a> </span><?php } ?> <!-- Display errors --> <script type="text/javascript"> <?php foreach ($errors as $error) { echo "alert('" . $error . "');"; } ?>