Advertisement
rhandom

Profile View

Mar 4th, 2012
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.73 KB | None | 0 0
  1.     <?php
  2.         if(empty($_REQUEST['enterCodeId'])){
  3.        
  4.                 echo "<script>
  5.                     location.replace('".$_SERVER['HTTP_REFERER']."');
  6.                     </script>";
  7.         }else{
  8.                 global $wpdb;
  9.         /*
  10.                 $getId=substr($_REQUEST['enterCodeId'], 4, 10);
  11.                 $querystr = $wpdb->prepare("SELECT ID FROM wp_7d8ftw_users WHERE ID='%s'",$getId);
  12.                 $querystr = "SELECT ID FROM wp_7d8ftw_users WHERE ID='".$getId."'";
  13.         */
  14.         $getId = null;
  15.         $getCode = $_POST['enterCodeId'];
  16.         // please set table name 'wp_usermeta' with you actual table name //wp_7d8ftw_usermeta
  17.                 $querystr = $wpdb->prepare("SELECT user_id FROM wp_7d8ftw_usermeta WHERE meta_key='myaccesskey' AND meta_value='%s'",$getCode);
  18.                 $querystrChecking = mysql_query($querystr);
  19.                 if(mysql_num_rows($querystrChecking)<=0){
  20.                     echo "<script>
  21.                     location.replace('".$_SERVER['HTTP_REFERER']."');
  22.                     </script>";
  23.                 }
  24.         elseif ($row = mysql_fetch_assoc($querystrChecking)) {
  25.             $getId = $row['user_id'];
  26.         }
  27.                 $uploads = wp_upload_dir();
  28.             //
  29.         }
  30.         ?>
  31.     <?php get_header(); ?>
  32.     <div id="wrapper2nd" class="inner">
  33.         <div class="content" id="inner">
  34.        
  35.         <h1>PROFILE</h1>
  36.         <div id="profileView">
  37.             <div class="alignLeft">
  38.              <strong> Name:</strong> <?php the_author_meta( 'first_name', $getId ); ?>   <?php the_author_meta( 'last_name', $getId); ?><br />
  39.               <strong> Nick Name:</strong> <?php the_author_meta( 'nickname', $getId ); ?><br />
  40.               <strong>Age:</strong><?php get_the_author_meta( 'dateofbirth', $getId );?><br />
  41.               <strong>Birthday: </strong>
  42.               <?=get_the_author_meta( 'dateofbirth', $getId );?><br />
  43.               <strong>Birthplace:</strong>
  44.               <?=get_the_author_meta( 'birthplace', $getId );?><br />
  45.               <strong>Current City:</strong>
  46.               <?=get_the_author_meta( 'currentcity', $getId );?> <br />
  47.               <strong>Favourite Colour:</strong>
  48.               <?=get_the_author_meta( 'favouritecolour', $getId );?> <br />
  49.               <strong>Favourite Book:</strong>
  50.               <?=get_the_author_meta( 'favouritebook', $getId );?><br />
  51.               <strong>Favourite Film:</strong>
  52.               <?=get_the_author_meta( 'favouritefilm', $getId );?><br />
  53.               <strong>Favourite Restaurant: </strong>
  54.               <?=get_the_author_meta( 'favouriterestaurant', $getId );?><br />
  55.               <strong>Favourite Quote:</strong>
  56.               <?=get_the_author_meta( 'favouritequote', $getId );?><br />
  57.               <strong>Favourite Quality in Women: </strong>
  58.               <?=get_the_author_meta( 'favouritequalityinwomen', $getId );?> <br />
  59.               <strong>My Favourite TV programs: </strong><br />
  60.             <?=get_the_author_meta( 'myfavouritetvprograms', $getId );?><br />
  61.             <strong>My Favourite Groups:</strong><br />
  62.             <?=get_the_author_meta( 'myfavouritegroups', $getId );?><br />
  63.             <strong>My Favourite Links:</strong><br />
  64.             <?=get_the_author_meta( 'myfavouritelinks', $getId );?>
  65.  
  66.           </div>
  67.              <div class="alignRight">
  68.                 <div class="left"><i>About Me:</i>
  69.                     <p> <?=the_author_meta( 'description', $getId); ?></p>
  70.                 </div>
  71.                 <div class="right">
  72.                     <?php if(get_the_author_meta( 'userphoto_thumb_file', $getId )!=""){?>
  73.                         <img src="<?=$uploads['baseurl'];?>/thumbs/<?=get_the_author_meta( 'userphoto_thumb_file', $getId );?>" />
  74.                     <?php }?>
  75.                 <a href="#" class="allpic">see all pictures</a>
  76.                 </div>
  77.                 <div class="clr"></div>
  78.                 <div class="contact"><strong>Contact information:</strong> <?= get_the_author_meta('user_email', $getId );?></div>
  79.              </div>
  80.              <div class="clr"></div>
  81.         </div>
  82.         </div>
  83.     </div>
  84.    
  85.      <?php if ( is_active_sidebar('inner')): ?>
  86.     <div id="wrapper3rd">
  87.       <div id="innerSidebarContent">
  88.      <?php dynamic_sidebar( 'inner' ); ?>
  89.            
  90.       </div>
  91.     </div>
  92.     <?php endif; // end sidebar widget area ?>
  93.  <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement