D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
designpitara.com
/
admin
/
Filename :
profile.php
back
Copy
<?php include("include/config.php"); include("include/sessionhandle.php"); include("include/header.php"); // include("$u_type/index.php"); $sqlAssign1 = "select * from `user_login` WHERE `username` = '$admin_userName'"; //echo $sqlAssign1; $resultAssign1 = mysqli_query($conn, $sqlAssign1); if (mysqli_num_rows($resultAssign1) > 0) { $i=1; while($rowAssign1 = mysqli_fetch_assoc($resultAssign1)) { $adm_name = $rowAssign1['name']; $adm_email = $rowAssign1['email']; $adm_phone = $rowAssign1['phone']; } } $sqlAssign11 = "select * from `admin_more_info` WHERE `user_name` = '$admin_userName'"; //echo $sqlAssign11; $resultAssign11 = mysqli_query($conn, $sqlAssign11); if (mysqli_num_rows($resultAssign11) > 0) { $i=1; while($row = mysqli_fetch_assoc($resultAssign11)) { $adm_websitename = $row['website_name']; $adm_owner_name = $row['owner_name']; $adm_phonea = $row['phone']; $adm_op_phone = $row['op_phone']; $adm_op_emaila = $row['op_email']; $adm_address = $row['address']; $adm_logo_img = $row['logo_img']; $adm_logo_sticky = $row['logo_sticky']; $adm_fav_img = $row['fav_img']; $adm_about_us = $row['about_us']; $adm_mission = $row['mission']; $adm_vision = $row['vision']; $adm_strength = $row['strength']; $fb_link = $row['facebook']; $youtube_link = $row['youtube']; $linkedin_link = $row['linkedin']; $instagram_link = $row['insta']; $p_meta_keywords = $row['p_meta_keywords']; $p_meta_desc = $row['p_meta_desc']; $meta_title = $row['meta_title']; } } //echo $adm_logo_sticky; $sqlAssignmsg = "select * from `home_page_marquee`"; //echo $sqlAssign11; $resultAssignmsg = mysqli_query($conn, $sqlAssignmsg); if (mysqli_num_rows($resultAssignmsg) > 0) { $i=1; while($rowx = mysqli_fetch_assoc($resultAssignmsg)) { $marquee_msg = $rowx['message']; } } ?> <style> .form-horizontal .form-group { margin-right: 0px; margin-left: 0px; } </style> <div class="small-header"> <div class="hpanel"> <div class="panel-body" style="text-align:left;"> <div id="hbreadcrumb" class="pull-right"> <ol class="hbreadcrumb breadcrumb"> <li><a href="<?php echo $admin_baseurl . 'dashboard.php';?>">Dashboard</a></li> </ol> </div> <h2 class="font-light m-b-xs"> Profile </h2> </div> </div> </div> <div class="content"> <div class="row"> <div class="col-lg-12"> <div class="hpanel"> <div class="hpanel"> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#tab-1">Personal Information:</a></li> <li class=""><a data-toggle="tab" href="#tab-2">Change Password </a></li> <li class=""><a data-toggle="tab" href="#tab-3">Home Page Message</a></li> </ul> <div class="tab-content"> <div id="tab-1" class="tab-pane active"> <div class="panel-body"> <form method="post" action="execute.php" class="form-horizontal" enctype="multipart/form-data"> <h4 class="page-header">Personal Information:</h4> <div class="form-group col-md-6"> <label>Website Title</label> <input required type="text" name="website_name" class="form-control" value="<?php echo $adm_websitename;?>"> </div> <div class="form-group col-md-6"> <label>Owner Name</label> <input required type="text" name="owner_name" class="form-control" value="<?php echo $adm_name;?>"> </div> <div class="col-md-6"> <div class="form-group"> <label>Phone Number</label> <input required type="tel" name="phone" class="form-control" value="<?php echo $adm_phone;?>"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>Phone Number(optional)</label> <input type="tel" name="phone_op" class="form-control" value="<?php echo $adm_op_phone;?>"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>Email</label> <input required type="email" name="email" class="form-control" value="<?php echo $adm_email;?>"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label>Email(optional)</label> <input type="email" name="email_op" class="form-control" value="<?php echo $adm_op_emaila;?>"> </div> </div> <div class="form-group col-md-12"> <label>Address</label> <input type="text" name="address" class="form-control" value="<?php echo $adm_address;?>"> </div> <div class="col-md-12"> <label class="control-label">About Us</label> <textarea required class="textarea form-control " id="ckeditor_about_us" name="ckeditor_about_us" placeholder="Enter text ..." rows="15" data-height="100"> <?php echo htmlspecialchars($adm_about_us);?></textarea> </div> <div class="col-md-4"> <label class="control-label">Mission</label> <textarea required class="textarea form-control " id="ckeditor_Mission" name="ckeditor_Mission" placeholder="Enter text ..." rows="15" data-height="100"> <?php echo htmlspecialchars($adm_mission);?></textarea> </div> <div class="col-md-4"> <label class="control-label">Vision</label> <textarea required class="textarea form-control " id="ckeditor_Vision" name="ckeditor_Vision" placeholder="Enter text ..." rows="15" data-height="100"> <?php echo htmlspecialchars($adm_vision);?></textarea> </div> <div class="col-md-4"> <label class="control-label">Strength</label> <textarea required class="textarea form-control " id="ckeditor_strength" name="ckeditor_strength" placeholder="Enter text ..." rows="15" data-height="100"> <?php echo htmlspecialchars($adm_strength);?></textarea> </div> <div class="col-md-4"> <label class="control-label">Upload Logo</label> <!-- <img scr="<?php echo $admin_baseurl .'upload/' . $adm_logo_img;?>" >--> <img src="<?php echo $admin_baseurl .'upload/' . $adm_logo_img;?>" style="width:100px; height:80px"> <input class="form-control" type="file" id="file" name="image_a" multiple="multiple" accept="image/*" /> </div> <div class="col-md-4"> <label class="control-label">Upload Sticky logo</label> <img src="<?php echo $admin_baseurl .'upload/' . $adm_logo_sticky;?>" style="height:80px;width:100px;background-color: black;"> <input class="form-control" type="file" id="file" name="image_c" multiple="multiple" accept="image/*" /> </div> <div class="col-md-4"> <label class="control-label">Upload Fav Icon</label> <img src="<?php echo $admin_baseurl .'upload/' . $adm_fav_img;?>" style="height:80px;width:100px"> <input class="form-control" type="file" id="file" name="image_b" multiple="multiple" accept="image/*" /> </div> <div class="col-md-3"> <div class="form-group"> <label>Facebook Link</label> <input type="text" name="fb_link" class="form-control" value="<?php echo $fb_link;?>" placeholder="Facebook link"> </div> </div> <div class="col-md-3"> <div class="form-group"> <label>Youtube Link</label> <input type="text" name="youtube_link" class="form-control" value="<?php echo $youtube_link;?>" placeholder="youtube link"> </div> </div> <div class="col-md-3"> <div class="form-group"> <label>Linkedin Link</label> <input type="text" name="linkedin_link" class="form-control" value="<?php echo $linkedin_link;?>" placeholder="Linkedin link"> </div> </div> <div class="col-md-3"> <div class="form-group"> <label>Instagram Link</label> <input type="text" name="instagram_link" class="form-control" value="<?php echo $instagram_link;?>" placeholder="instagram link"> </div> </div> <div class="col-md-12"> <div class="form-group"> <label>Meta Title</label> <input type="text" name="meta_title" class="form-control" value="<?php echo $meta_title;?>" placeholder="meta title " required> </div> </div> <div class="col-md-12"> <div class="form-group"> <label>Keywords</label> <input type="text" name="p_meta_keywords" class="form-control" value="<?php echo $p_meta_keywords;?>" placeholder="meta Keywords " required> </div> </div> <div class="col-md-12"> <div class="form-group"> <label>Meta Description</label> <input type="text" name="p_meta_desc" class="form-control" value="<?php echo $p_meta_desc;?>" placeholder=" Meta Description" required> </div> </div> <div class="col-md-12"> <div class="form-group" style="padding:0 20px;"> <br> <div class="text-right"> <input type="hidden" value="<?php echo $admin_userName;?>" name="admin_userNames"> <button type="submit" name="update_admin_profile" class="btn btn-primary">Update Profile</button> </div> </div> </div> </form> </div> </div> <div id="tab-2" class="tab-pane"> <div class="panel-body"> <form method="post" action="" name="form"> <h4 class="page-header">Change Password:</h4> <div class="form-group col-md-6"> <label>New Password</label> <input type="password" name="newpassword" class="form-control" placeholder="New Password..."> </div> <div class="form-group col-md-6"> <div class="text-right"> <br> <input type="hidden" value="<?php echo $admin_userName;?>" name="admin_userNames"> <button type="submit" name="pass" class="btn btn-primary">Update Password</button> </div> </div> </form> </div> </div> <div id="tab-3" class="tab-pane"> <div class="panel-body"> <form method="post" action="" name="form"> <h4 class="page-header">Home Page Marquee news:</h4> <div class="form-group col-md-12"> <label>News</label> <input type="text" name="newMessage" class="form-control" value="<?php echo $marquee_msg;?>" placeholder="New Message for current batches or else..."> </div> <div class="form-group col-md-12"> <div class="text-right"> <br> <button type="submit" name="home_page_marquee" class="btn btn-primary">Update Message</button> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> </div> <?php if(isset($_POST['pass'])) { $newpassword = $_POST['newpassword']; $admin_userNamesx = $_POST['admin_userNames']; $sss = md5($newpassword); $changequery="UPDATE `user_login` SET `password`='$sss' WHERE `user_login`.`username` = '$admin_userNamesx'"; // echo $changequery; die; if (mysqli_query($conn, $changequery)) { header("location:profile.php"); } else { include('include/error-modal.php'); } mysqli_close($conn); } if(isset($_POST['home_page_marquee'])) { $maq_msg = mysqli_real_escape_string($conn,$_POST['newMessage']); $uquery="UPDATE `home_page_marquee` SET `message`='$maq_msg'"; // echo $changequery; die; if (mysqli_query($conn, $uquery)) { header("location:profile.php"); } else { include('include/error-modal.php'); } mysqli_close($conn); } ?> <script> $(function() { CKEDITOR.replace('ckeditor_about_us'); CKEDITOR.replace('ckeditor_Mission'); CKEDITOR.replace('ckeditor_Vision'); CKEDITOR.replace('ckeditor_strength'); }); </script> <?php include('include/footer.php'); ?>