Jump to content

PHP Help - Urgent


anuraag09

Recommended Posts

Hello Guys,

 

I need help with my php code - i am not an engineer or technical guy and my coder has run away.

 

My website has a news & events page where the latest news related to our organisations are scrolled (page name nne.php)...if a user clicks on any of the news the page redirects to the detailed news section (page name newsdetails.php)

 

my coder has designed the nne.php but has not designed newsdetails.php

 

nne.php is as below - please let me know what to code in newsdetails.php

 

<!----------- Website Designed & Developed by: Anuraag -------------->
 
<!doctype html>
<html>
<head>
<title>Events |  Anuraag</title>
<?php
require_once("externalFiles.php");
?>
 
<!----------------------owlCarousel----------------------->
 
 
<link href="css/owl.carousel.css" rel="stylesheet">
 <script src="js/owl.carousel.min.js"></script>
 
<script type="text/javascript">
 $(document).ready(function() {
 
var owl = $("#owl-demo");
 
  
  owl.owlCarousel({
 autoPlay:true,
    items : 4,
    navigation : true
  }); 
  
  
  
    // Custom Navigation Events
  $(".next").click(function(){
    owl.trigger('owl.next');
  })
  $(".prev").click(function(){
    owl.trigger('owl.prev');
  })
  $(".play").click(function(){
    owl.trigger('owl.play',1000); //owl.play event accept autoPlay speed as second parameter
  })
  $(".stop").click(function(){
    owl.trigger('owl.stop');
  })
 
});
 </script>
 
</head>
 
<body>
 
<?php
require_once("header.php");
?>
 
 
<div class="pgTitle">
<div class="container">
     <div class="row">
          <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
              <h2 class="font-monda text-white text-center text-uppercase">News & Event</h2>
                <h4 class="font-MavenPro text-li8green text-center text-uppercase"></h4>
             </div>
        </div>
     </div>
</div>
<div class="newsevent">
  <div class="container">
     <div class="row">
         <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
<h2 class="font-monda text-black">Upcoming Event</h2>
<hr/>
<div class="event1">
<?php
    date_default_timezone_set("Asia/Kolkata"); 
    $tdate= date('Y-m-d'); //Returns IST 
require_once("selectAll.php"); //Includes file for searching data in database
require_once("ip.php"); //Includes file for database 
$db_str=retDbDetails();
$db_arr=explode(",",$db_str);
$tableName="events";
$searchQuery="where date1 >'$tdate';";
$fieldName="name,date1,time1,mimage,venue,guest,description,details,pk";
$details=dataSelectAll($db_arr[0],$db_arr[1],$db_arr[2],$db_arr[3],$tableName,$searchQuery,$fieldName);
$strnew=explode("|#|",$details);
//echo $strnew[0];
if($details==""){
echo "No Data found";
}
else
{
//for($j=count($strnew)-1;$j>=0;$j--)
for($j=0;$j<count($strnew);$j++)
{
}
$str=explode("||",$strnew[$j-1]);
 
?>
<p><span><?php echo $str[0] ?></span></p>
<img src="adminPanel\admin\events\<?php echo $str[3] ?>" class="img-responsive">
<div class="event2">
<p><br/><?php echo $str[6] ?></p>
<p><span>Date & Time :-</span> <?php echo $str[1]."    ".$str[2]?></p>
<p><span>Venue :-</span> <?php echo $str[4] ?></p>
<p><span>Special Guests/Speakers :-</span> <?php echo $str[5] ?></p>
<p><span>Other details :-</span> <?php echo $str[7] ?></p>
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#userloginModal1<?php echo $str[8] ?>">Join Event</button>
</div>
<?php } ?>
</div>
</div>
 
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> 
<h2 class="font-monda text-black">More Events</h2>
<hr/>
<div class="navbar-header pull-right">
<button type="button" class="navbar-toggle" data-toggle="collapse"  data-target="#size-list">
<i class="fa fa-bars fa-2x"></i></button>
</div>
<div class="events">
<ul>
<?php
$tableName1="events";
$searchQuery1="where date1 >'$tdate';";
$fieldName1="name,pk";
$details1=dataSelectAll($db_arr[0],$db_arr[1],$db_arr[2],$db_arr[3],$tableName1,$searchQuery1,$fieldName1);
$strnew1=explode("|#|",$details1);
//echo $strnew[0];
if($details1==""){
echo "No Data found";
}
else
{
//for($j=count($strnew)-1;$j>=0;$j--)
for($j1=0;$j1<count($strnew1);$j1++)
{
$str1=explode("||",$strnew1[$j1]); 
 
?>
 
<li><a href="morenne.php?id=<?php echo $str1[1] ?>"><?php echo $str1[0] ?></a></li>
 
<?php } } ?>
</ul>
</div>
 
<h2 class="font-monda text-black">News</h2>
<hr/>
<div class="Newses" id="ulanimate">
<marquee direction="up" loop="-1" scrollamount="2" scrolldelay="20" width="100%" height="100%" behavior="scroll" onmouseover="this.stop();" onmouseout="this.start();" >
<ul> 
<?php
$tableName1="news";
$searchQuery1=";";
$fieldName1="heading,pk";
$details1=dataSelectAll($db_arr[0],$db_arr[1],$db_arr[2],$db_arr[3],$tableName1,$searchQuery1,$fieldName1);
$strnew1=explode("|#|",$details1);
//echo $strnew[0];
if($details1==""){
echo "No Data found";
}
else
{
//for($j=count($strnew)-1;$j>=0;$j--)
for($j1=0;$j1<count($strnew1);$j1++)
{
$str1=explode("||",$strnew1[$j1]); 
 
?>
 
<li>[b]<a href="newsDetails.php?id=<?php echo $str1[1] ?>"><?php echo $str1[0] ?></a></li>[/b]
[b]<?php } } ?>[/b]
 
</ul>
</marquee>
</div>
 
</div>
        </div>
</div>
</div>
 
<div class="event-carousel">
<div class="container">
     <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<h2 class="font-monda text-black">Latest Event</h2>
<hr/>
             <div id="owl-demo" class="owl-carousel">
<?php
$tableName11="events";
$searchQuery11="where date1 <='$tdate';";
$fieldName11="name,pk,mimage";
$details11=dataSelectAll($db_arr[0],$db_arr[1],$db_arr[2],$db_arr[3],$tableName11,$searchQuery11,$fieldName11);
$strnew11=explode("|#|",$details11);
//echo $strnew[0];
if($details11==""){
echo "No Data found";
}
else
{
//for($j=count($strnew)-1;$j>=0;$j--)
for($j11=0;$j11<count($strnew11);$j11++)
{
$str11=explode("||",$strnew11[$j11]); 
 
?>
                    <div class="item">
                        <a href="morenne.php?id=<?php echo $str11[1] ?>">
                        <img src="adminPanel\admin\events\<?php echo $str11[2] ?>" class="img-responsive">
<div class="owlposi">
<?php echo $str11[0] ?>
</div></a>
</div>
<?php }} ?>
                    <!--<div class="item">
                        <a href="service.php">
                        <img src="img/mentor.jpg" class="img-responsive">
<div class="owlposi">
Lorem ipsum
</div></a>
</div>
                    <div class="item">
                        <a href="service.php">
                       <img src="img/mentor.jpg" class="img-responsive">
  <div class="owlposi">
Lorem ipsum
</div></a>
</div>
                    <div class="item">
                        <a href="service.php">
                        <img src="img/mentor.jpg" class="img-responsive">
<div class="owlposi">
Lorem ipsum
</div></a>
</div>
                    <div class="item">
                        <a href="service.php">
                        <img src="img/mentor.jpg">
<div class="owlposi">
Lorem ipsum
</div></a>
</div>-->
                    
</div>
            </div>
        </div>
    </div>
</div>
<?php
$tableName="events";
$searchQuery="where date1 >'$tdate';";
$fieldName="name,date1,time1,mimage,venue,guest,description,details,pk";
$details=dataSelectAll($db_arr[0],$db_arr[1],$db_arr[2],$db_arr[3],$tableName,$searchQuery,$fieldName);
$strnew=explode("|#|",$details);
for($j=0;$j<count($strnew);$j++)
{
}
$str=explode("||",$strnew[$j-1]);
?>
<div class="modal fade eventmodal" id="userloginModal1<?php echo $str[8] ?>" role="dialog">
    <div class="modal-dialog modal-md">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">×</button>
          <h4 class="modal-title font-monda text-white">JOIN EVENT</h4>
        </div>
        <div class="modal-body">
          <form role="form" method="post" action="inserEvent.php" class="makeAppoForm font-hind"> <!-----------custRegis---------->
<div class="row">
<div class="form-group">
 <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<label for="fname">First Name</label>
<input class="form-control" id="fname" type="text" name="fname" placeholder="">
 </div>
</div>
 
<div class="form-group">  
 <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<label for="mname">Middle Name</label>
<input class="form-control" id="mname" type="text" name="mname" placeholder="">
 </div>
</div>
 
<div class="form-group">  
 <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12">
<label for="lname">Last Name</label>
<input class="form-control" id="lname" type="text" name="lname" placeholder="">
 </div>
</div>
 
<div class="form-group">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<label for="mobile">Mobile</label>
<input type="text" name="mobile" id="mobile" class="form-control" maxlength="10" onkeypress="return isNumber(event)" placeholder="">
</div>
</div>
 
<div class="form-group">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<label for="mail">E-Mail</label>
<input type="email" name="mail" id="mail" class="form-control" placeholder="">
</div>
</div>
 
<div class="form-group">  
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label for="add">Address</label>
<textarea type="text" name="add" id="add" class="form-control" placeholder=""></textarea><br/>
</div>
</div>
 
<input class="form-control" id="pk" type="hidden" name="pk" value="<?php echo $str[8] ?>" placeholder=""> 
  <div class="form-group">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
 <button type="submit" class="btn btn-border1-black-transparent"><i class="fa fa-caret-square-o-right"></i> Send Request </button>
 <button type="reset" class="btn btn-border1-black-transparent"><i class="fa fa-eraser"></i> Clean All </button>
</div>
</div>
</div>
</form>
        </div>
      </div>
    </div>
  </div>
<?php
require_once("sitemap.php");
require_once("footer.php");
?>
 
</body>
</html>
Edited by requinix
please use [code] tags when posting code
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.