Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require '../theme/sub.head.php';
- # get last word of url
- $profilewho = $_SERVER['REQUEST_URI'];
- preg_match("/[^\@]+$/", $profilewho, $matches);
- $usernameurl = $matches[0];
- $Origin->profileDetails($usernameurl);
- $sql = mysqli_connect("localhost", "root", "", "new");
- $data = mysqli_query($sql, "SELECT * FROM `user_post` WHERE userID =".$_SESSION['id']." ORDER BY postDateTime DESC LIMIT 1 ");
- $data5 = mysqli_query($sql, "SELECT hireworker_application.*, worker.firstname as wf, worker.lastname as wl, worker.workerAddress as wa, user.* FROM hireworker_application INNER JOIN user ON hireworker_application.userID = user.id INNER JOIN worker ON hireworker_application.workerID = worker.id WHERE hireworker_application.userID = ".$_SESSION['id']."");
- // $data2 = mysqli_query($sql, "SELECT user.*, worker.*, user_comment.* FROM `user_comment` INNER JOIN user ON user_comment.userID = ".$_SESSION['id']." INNER JOIN worker ON user_comment.workerID=worker.id WHERE user_comment.userID=".$_SESSION['id']." ");
- $data2 = mysqli_query($sql, "SELECT * FROM user_comment WHERE userID = ".$_SESSION['id']." AND commentPerson = 'Client' ORDER BY commentDate DESC LIMIT 2");
- $data4 = mysqli_query($sql,
- "SELECT application.* , worker.*, user_post.* FROM application
- INNER JOIN worker ON application.worker_id = worker.id
- INNER JOIN user_post ON application.post_id = user_post.postID
- WHERE application.user_id = ".$_SESSION['id']." AND application.applicationStatus = 'finished' ORDER BY applicationID DESC
- LIMIT 1
- ");
- ?>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- <body>
- <?php
- require '../theme/navigation.client.php';
- ?>
- <?php
- if($usernameurl==$Origin->username){ ?>
- <div class="gtco-client" style="margin-top: -8%;">
- <div class="gtco-services gtco-section">
- <div class="col-md-12 col-sm-4 service-wrap">
- <div class="service" style="height: auto;">
- <div style="height: 100%;"><a class="btn" name="profname"><p style="color:#17B794"><b><?php echo ucwords($Origin->profileFNAME); echo " "; echo ucwords($Origin->profileMNAME); echo " "; echo ucwords($Origin->profileLNAME); ?></b></p></a></div><br>
- <div><b><i class="ti-star"></i> 4/5</b></div><br>
- <div><img src="../theme/images/<?php echo $Origin->profilePIC; ?>" alt="Avatar" style="width:200px; height: 200px; border-radius:50%; border: 6px solid #17B794;"></div>
- <div><b style="color: #17B794;">@<?php echo $Origin->profileUNAME;?></b></div>
- <div style="font-size: 12px;"><b><i class="ti-location-pin"></i> Basak Mandaue Cebu City</b></div>
- <div style="font-size: 12px;"><b><i class="ti-mobile"></i><?php echo $Origin->profileCONTACT; ?></b></div><br>
- <?php
- echo '<a target="_blank" class="btn btn-primary" data-toggle="modal" data-target="#myModal">EDIT</a>';
- }else{
- echo '<script>window.location= "../c/@'.$Origin->username.'"</script>';
- }
- ?>
- </div>
- </div>
- <?php if($usernameurl == $Origin->username){ ?>
- <div class="col-md-4 col-sm-4 service-wrap">
- <div class="service" style="height: 100%">
- <div><a href="activities?@<?php echo $Origin->profileUNAME;?>" class="btn"><i class="ti-check-box"></i> ACTIVITIES </a></div><br>
- <?php while($row2 = mysqli_fetch_array($data)){ ?>
- <div class="service" >
- <p >STATUS: <?php echo $row2['status']; ?>
- <span style="float: right;">Date: <?php echo $row2['postDateTime'];?></span>
- <br/>
- <span><b class="" style="float: left;">Posted By: <a href="#profname"><?php echo ucfirst($Origin->profileFNAME); ?> <?php echo ucfirst($Origin->profileMNAME); ?></a></b></span><br/>
- <span><b class="">Looking for:</b> <?php echo ucfirst($row2['postTitle']); ?></span><br/>
- <span><b class="">In need of:</b> <?php echo ucfirst($row2['postCategory']); ?></span><br/>
- <div style="max-width: 100%; word-break: break-all;"><b class="" style="float: left;">Description:</b><br/><?php echo ucfirst($row2['postDesc']); ?></div><br/><p>
- <iframe
- width="100%"
- height="250"
- frameborder="0"
- scrolling="no"
- marginheight="0"
- marginwidth="0"
- src="https://maps.google.com/maps?q=+<?php echo $row2["postLong"];?>+,+<?php echo $row2["postLat"];?>+&hl=es;z=14&output=embed"
- ></iframe>
- <!-- <a target="_blank" class="btn btn-block btn-primary">FINISH</a> -->
- </div>
- <?php }?>
- </div>
- </div>
- <div class="col-md-4 col-sm-4 service-wrap">
- <div class="service" style="height: 100%">
- <div><a class="btn" href="comments"><i class="ti-comments"></i> COMMENTS </a></div><br>
- <?php while($row3= mysqli_fetch_array($data2)){
- $data3 = mysqli_query($sql, "SELECT * FROM worker WHERE id = ".$row3['workerID']." ");
- $row4 = mysqli_fetch_array($data3);
- ?>
- <div class="service" >
- <center><a href="workerprofile?id=<?php echo $row4['id'];?>"><img src="../theme/images/1.jpg" style="width:50px; height: 50px; border-radius:50%; border: 6px solid #17B794;"></a></center>
- <span style="font-size: 15px; color: #17B794;"><?php echo ucfirst($row4['firstname']);?> <?php echo ucfirst($row4['lastname']);?></span><br>
- <span style="font-size: 10px; color: #17B794;"><?php echo ucfirst($row3['commentDate']);?></span>
- <center><div ><?php echo $row3['commentPost']; ?></div></center>
- </div>
- <?php }?>
- </div>
- </div>
- <div class="col-md-4 col-sm-4 service-wrap">
- <div class="service" style="height: 100%">
- <div><a class="btn" href="history"><i class="ti-harddrives"></i> HISTORY </a></div><br>
- <?php while($row5 = mysqli_fetch_array($data4)){ ?>
- <div class="service" >
- <br/>
- <p><i class="ti-announcement"></i> Successful transaction (NORMAL) </p>
- <a href="workerprofile?id=<?php echo $row5['id'];?>"><img src="../theme/images/1.jpg" style="width:50px; height: 50px; border-radius:50%; border: 6px solid #17B794;"></a><br/>
- <span style="font-size: 15px; color: #17B794;">
- <i class="ti-user"></i> <?php echo $row5['firstname']." ". $row5['lastname'];?></span><br>
- <i class="ti-check"></i> Post ID: <?php echo $row5['post_id'];?><br/>
- <i class="ti-check"></i> Application ID: <?php echo $row5['applicationID'];?><br/>
- <iframe src="https://www.google.com/maps/embed/v1/directions?origin=<?php echo $row5 ['postLocation'];?>&destination=<?php echo $row5['workerAddress']; ?>&key=AIzaSyBSMUrTfFC8nrU3dXgN_TvD3YfsuD-1bu4" width="100%" height="250" frameborder="0" style="border: 0;" allowfullscreen></iframe>
- </div>
- <?php }?>
- <?php while($row6 = mysqli_fetch_array($data5)){
- if($row6['dateFinished']=='Yes'){
- ?>
- <div class="service" >
- <br/>
- <p><i class="ti-announcement"></i> Successful transaction (URGENT) </p>
- <a href="workerprofile?id=<?php echo $row5['id'];?>"><img src="../theme/images/1.jpg" style="width:50px; height: 50px; border-radius:50%; border: 6px solid #17B794;"></a><br/>
- <span style="font-size: 15px; color: #17B794;">
- <i class="ti-user"></i> <?php echo $row6['wf']." ". $row6['wl'];?></span><br>
- <i class="ti-check"></i> WORKER ID: <?php echo $row6['workerID'];?><br/>
- <i class="ti-check"></i> HIRE ID: <?php echo $row6['hireID'];?><br/>
- <iframe src="https://www.google.com/maps/embed/v1/directions?origin=<?php echo $row6['user_address'];?>&destination=<?php echo $row6['wa']; ?>&key=AIzaSyBSMUrTfFC8nrU3dXgN_TvD3YfsuD-1bu4" width="100%" height="250" frameborder="0" style="border: 0;" allowfullscreen></iframe>
- </div>
- <?php } }?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php }else{?>
- </div>
- </div>
- </div>
- <?php
- } require '../theme/footer.php';
- ?>
- <!-- MODAL HERE -->
- <div class="modal fade" id="myModal" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <form class="form-horizontal" action="../functions/query.updateprofile.php" enctype="multipart/form-data" method="POST">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">Edit Credentials</h4>
- </div>
- <div class="modal-body">
- <center><img src="../theme/images/<?php echo $Origin->profilePIC; ?>" alt="Avatar" style="width:200px; height: 200px; border-radius:50%; border: 6px solid #17B794;"><br/>
- <label for="files" class="btn" name="imageU">Change Profile Picture</label>
- <input id="files" style="visibility:hidden;" type="file" accept="/*" name="imageU"></center>
- <div class="form-group">
- <label class="col-lg-3 control-label">First name:</label>
- <div class="col-lg-8">
- <input class="form-control" type="text" placeholder="Enter first name" name="firstname" value="<?php echo $Origin->profileFNAME; ?>">
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">Middle name:</label>
- <div class="col-lg-8">
- <input class="form-control" type="text" placeholder="Enter first name" name="middlename" value="<?php echo $Origin->profileMNAME; ?>">
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">Last name:</label>
- <div class="col-lg-8">
- <input class="form-control" type="text" placeholder="Enter last name" name="lastname" value="<?php echo $Origin->profileLNAME; ?>">
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">Email:</label>
- <div class="col-lg-8">
- <input class="form-control" type="text" placeholder="ex.abc@cde.com" name="email" value="<?php echo $Origin->email;?>">
- </div>
- </div>
- <div class="form-group">
- <label class="col-lg-3 control-label">Contact Number:</label>
- <div class="col-lg-8">
- <input class="form-control" type="text" placeholder="ex. 09xxxxxxxxx" name="contact" value="<?php echo $Origin->userContact;?>">
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <div class="form-group">
- <div class="col-md-8">
- <input type="submit" name="updateUserProf" value="Save changes" class="btn btn-primary">
- <span></span>
- <input type="button" class="btn btn-default" value="Cancel" data-dismiss="modal" id="myButton">
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- END OF MODAL -->
- <?php
- require '../theme/gototop.php';
- require '../theme/footscripts.php';
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement