PHP Classes

File: fwphp/glomodul/user/upd_user_loggedin_frm.php

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/user/upd_user_loggedin_frm.php   Download  
File: fwphp/glomodul/user/upd_user_loggedin_frm.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: Update of fwphp/glomodul/user/upd_user_loggedin_frm.php
Date: 1 year ago
Size: 4,873 bytes


Class file image Download
// J:\awww\www\fwphp\glomodul\user\upd_ user_loggedin_frm.php
namespace B12phpfw ; //FUNCTIONAL, NOT POSITIONAL eg : B12phpfw\b12phpfw\ver5

use B12phpfw\core\b12phpfw\Config_allsites as utl ;
B12phpfw\dbadapter\user\Tbl_crud as utl_module; //to Login_ Confirm_ SesUsrId


// Why i n c h d r and f t r must be here - in v i e w script :
//Warning: Cannot modify header information - headers already sent by (output started at J:\awww\www\fwphp\glomodul\user\n avbar.php:26) in J:\awww\www\b12phpfw\Config_allsites.php on line 306
//$AdminId = (int)$pp1->uriq->id ;
$AdminId = (int)$_SESSION["userid"];
// 1. S U B M I T E D A C T I O N S
if(isset($_POST["Submit"])) // or if ( !empty($_POST) )
$cursor = utl_module::uu($pp1, $other=['caller' => __FILE__ .' '.', ln '. __LINE__]);
//E n d of Submit Button If-Condition

    // 2. G U I to get user action
       // returns object :
$rr = utl_module::rr_byid( $AdminId, $other=[ 'caller' => __FILE__ .' '.', ln '. __LINE__ ] );

$pp1->shares_path . '/hdr.php';
<!-- HEADER -->
<header class="bg-dark text-white py-3">
  <div class="container">
    <div class="row">
      <div class="col-md-12">

        @User: <span class="text-dark">
          <a href="<?=$pp1->rr?>username/<?php echo self::escp($rr->username); ?>"
             title="Show profile">

        <i class="fas fa-user text-success mr-2"></i>User name: <?=$rr->aname?>

      <XXXsmall> &nbsp;&nbsp;&nbsp; Usr headline: <?=$rr->aheadline?></XXXsmall>

<!-- HEADER END -->

<!-- Main Area -->
<section class="container py-2 mb-4">
  <div class="row">

    <!-- Left Area -->
    <div class="col-md-3">
      <div class="card">
        <div class="card-header bg-dark text-light">
          <h4> <?php echo $rr->aname; ?></h4>
        <div class="card-body">
          <img src="Uploads/<?php echo $rr->aimage; ?>" class="block img-fluid mb-3" alt="">
          <div class="">Biography: <?=$rr->abio?> </div>


    <!-- Right Area -->
    <div class="col-md-9" style="min-height:400px;">
      <?php echo utl::msg_err_succ('script='. basename(__FILE__) .' line='. __LINE__) ; ?>

      <form class="" action="<?=$pp1->upd_user_loggedin . $AdminId?>"
            method="post" enctype="multipart/form-data">

        <div class="card bg-dark text-light">
          <div class="card-header bg-secondary text-light">
            <h4>Edit Profile</h4>

          <div class="card-body">

            <div class="form-group">
               <input class="form-control" type="text" name="Name" id="title"
                      title="Your name" placeholder="Your name"

            <div class="form-group">
               <input class="form-control" type="text" name="Headline" id="title"
                      title="Headline (eg I am boring user)" placeholder="Headline"
                  <small class="text-muted">
                  Add a professional headline like, 'Engineer' at XYZ or 'Architect' </small>
                  <span class="text-danger">Not more than 30 characters</span>

            <div class="form-group">
               <textarea class="form-control" name="Bio" id="Post" rows="8" cols="80"
                          title="Your Biography" placeholder="Your Biography"

            <div class="form-group">
              <div class="custom-file">
              <input class="custom-file-input" type="File" name="Image" id="imageSelect" value="">
              <label for="imageSelect" class="custom-file-label">Choose Image </label>

            <div class="row">
              <!-- was $pp1-> dashboard Back To Dashboard -->
              <div class="col-lg-6 mb-2">
                <a href="<?=$pp1->home_url?>" class="btn btn-warning btn-block">
                   <i class="fas fa-arrow-left"></i> Back To Home</a>

              <div class="col-lg-6 mb-2">
                <button type="submit" name="Submit" class="btn btn-success btn-block">
                  <i class="fas fa-check"></i> Publish




</section><!-- End Main Area -->

require $pp1->shares_path . '/ftr.php';