Jump to content

Chrisj

Members
  • Content Count

    482
  • Joined

  • Last visited

  • Days Won

    1

Chrisj last won the day on October 19 2014

Chrisj had the most liked content!

Community Reputation

1 Neutral

About Chrisj

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello McGyver, I have re-read your great advice (thank you again), regarding the "two tables". I am trying to understand more clearly what you've advised, and trying to improve what is already there (rather than re-create everything). Would it be possible that you could message me so I might be able to ask you some more specifics directly? Thanks again for your kind posting replies. I look forward to your positive response. Many thanks again
  2. Great help. Thanks for all the replies, and for your last clue. The html table now successfully displays the ID, PAYER_NAME, AMOUNT, etc. of the transactions pertaining to the logged-in User’s videos. I am wondering, however, if instead of the html table showing, in the Payer_Name column, the payers’ id, if it could display that payer’s ‘username’ instead? The only place ‘username’ is stored is in the ‘users’ db table. Any clues, as to how that might be possible, are appreciated.
  3. Much thanks for reply/help and example. I tried this without success: WHERE upv.time_date AND upv.user_id_uploaded = user_id ORDER BY upv.time_date DESC"); in 'u_paid_videos ' db table the 'user_id_uploaded' column represents the owner (uploader) of the video and 'user_id" is owner/uploader from the 'videos' db table, which would be, I think should be the logged-in user seeing this page. apparently I am not getting the correct <user id of record> or <id of current user>, or something else is incorrect. (in 'users' db table the user id column is simply 'id'). any additional assistance is appreciated
  4. Thanks for your reply. I appears that this now successfully reflects the correct PAYER NAME, in the html table, after this query was changed to this: $get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.*, upv.id_user as id_user, upv.earned_amount as earned_amount, upv.time_date as time_date FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.time_date ORDER BY upv.id DESC"); So, for each transaction; ID, PAYER_NAME, VIDEO_NAME, AMOUNT, CURRENCY and TIME now displays correctly in the html table. The full page shows the earned amount for the User and his purchase balance, and now thanks to this latest query modification the page also displays the correct data in an html table at the bottom of the page. However, it should just display the ID, PAYER_NAME, AMOUNT, etc. of the transactions pertaining to this User's videos, but it displays all transactions. In fact, all Users now see all transactions, not just those transactions pertaining to their own videos. So, I'm looking for some assistance with getting the code to just display the transaction data only pertaining to a Users' own videos. Any guidance is appreciated.
  5. Thanks for the replies. I have made progress where all columns of the html table populate correctly, except for the PAYER_NAME column: $ads_list1 = ''; $pt->videos = $get_videos; $get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.*, upv.earned_amount as earned_amount, upv.id_user as id_user, upv.time_date as time_date FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} AND upv.time_date ORDER BY upv.id DESC"); $pt->videos = $get_videos; if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $ads_list1 .= PT_LoadPage('transactions/list',array( 'ID' => $video->id, 'PAYER_NAME' => $user->id, 'VIDEO_NAME' => $video->title, 'AMOUNT' => $video->earned_amount, "CURRENCY" => $currency, 'TIME' => date("Y-m-d h:i A (T)", strtotime($video->time_date)) )); } } I'd like the PAYER_NAME data to come from the db table: 'u_paid_videos' > 'id_user' column. Any ideas, suggestions are appreciated
  6. Thanks for your reply/help. Now the displayed result is much improved, thanks. However, ultimately, I'm trying to display data in that table when a purchase takes place. I have added/copied this code to that page: " " " " " " $ads_list1 = ''; $get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.* FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} ORDER BY upv.id"); if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $ads_list1 .= PT_LoadPage('transactions/list',array( 'ID' => $video->id, 'PAID_USER' => $user->id, 'VIDEO_NAME' => $video->title, 'AMOUNT' => $tr->earned_amount, "CURRENCY" => $currency, "TIME" => $tr->time_date )); } } $total_earn = $total_earn + $total_ads; $pt->array = implode(', ', $array); $pt->ads_array = implode(', ', $ads_array); $pt->page_url_ = $pt->config->site_url.'/transactions'; $pt->title = $lang->earnings . ' | ' . $pt->config->title; $pt->page = "transactions"; $pt->description = $pt->config->description; $pt->keyword = @$pt->config->keyword; $pt->currency = $currency; $pt->content = PT_LoadPage('transactions/content',array( 'CURRENCY' => $currency, 'ADS_LIST' => $ads_list1, 'TOTAL_EARN' => $total_earn, 'TODAY_EARN' => $today_earn, 'MONTH_EARN' => $month_earn )); and it populates the html table, but appears to repeat that same thing in the 'time' column and the Payer Name displayed is incorrect. The Payer Name should come from the 'u_paid_videos' table column named 'id_user'. Any additional assistance will be appreciated (and help getting the table to display in ID order). thanks
  7. Thanks for your reply. I'd like to substitute with id_user, user_id_uploaded, id_video, earned_amount and time_date, so I have tried this: $total_earn = $total_earn + (float)$net; if (!empty($video) && !empty($user_data)) { $ads_list .= PT_LoadPage('transactions/list',array( 'ID' => $tr->id, 'PAID_USER' => $tr->id_user, 'USER_NAME' => $tr->user_id_uploaded, 'VIDEO_ID_' => $tr->id_video, 'AMOUNT' => $tr->earned_amount, "CURRENCY" => $currency, "TIME" => $tr->time_date //'ID' => $tr->id, //'PAID_USER' => substr($user_data->name, 0,20), //'PAID_USER' =>id_user, //'PAID_URL' => $user_data->url, //'USER_NAME' => $user_data->username, //'VIDEO_NAME' => substr($video->title, 0,20) , //'VIDEO_URL' => $video->url, //'VIDEO_ID_' => PT_Slug($video->title, $video->video_id), //'AMOUNT' => $tr->earned_amount, //"CURRENCY" => $currency, //"A_CURRENCY" => $admin_currency, //"NET" => $net, //"TIME" => PT_Time_Elapsed_String($tr->time) )); } } } on the html page I see this: see attached image. Any additional assistance is appreciated.
  8. The php web script that I’m trying to modify shows an html page of transactions. I’d like to change what is displayed there. The array that generates what is displayed begins on approx line 184 (in bold, near the bottom of the code below, with the line: $ads_list .= PT_LoadPage('transactions/list',array( I’d like help to substitute what appears on the html transaction page by changing what is listed in the transaction/list array (with data from the ‘u_paid_videos’ table, which has these columns: id, id_user, id_video, video_title, time, user_id_uploaded, time_date, earned_amount, currency). Here is current the php code: <?php error_reporting(-1); // set maximum errors ini_set('display_errors' , 'true'); if (!IS_LOGGED || ($pt->config->sell_videos_system == 'off' && $pt->config->usr_v_mon == 'off') ) { header('Location: ' . PT_Link('404')); exit; } $currency = '$'; if ($pt->config->payment_currency == 'EUR') { $currency = '€'; } $types = array('today','this_week','this_month','this_year'); $type = 'today'; if (!empty($_GET['type']) && in_array($_GET['type'], $types)) { $type = $_GET['type']; } if ($type == 'today') { $start = strtotime(date('M')." ".date('d').", ".date('Y')." 12:00am"); $end = strtotime(date('M')." ".date('d').", ".date('Y')." 11:59pm"); $array = array('00' => 0 ,'01' => 0 ,'02' => 0 ,'03' => 0 ,'04' => 0 ,'05' => 0 ,'06' => 0 ,'07' => 0 ,'08' => 0 ,'09' => 0 ,'10' => 0 ,'11' => 0 ,'12' => 0 ,'13' => 0 ,'14' => 0 ,'15' => 0 ,'16' => 0 ,'17' => 0 ,'18' => 0 ,'19' => 0 ,'20' => 0 ,'21' => 0 ,'22' => 0 ,'23' => 0); $ads_array = $array; $date_type = 'H'; $pt->cat_type = 'today'; $pt->chart_title = $lang->today; $pt->chart_text = date("l"); } elseif ($type == 'this_week') { $time = strtotime(date('l').", ".date('M')." ".date('d').", ".date('Y')); if (date('l') == 'Saturday') { $start = strtotime(date('M')." ".date('d').", ".date('Y')." 12:00am"); } else{ $start = strtotime('last saturday, 12:00am', $time); } if (date('l') == 'Friday') { $end = strtotime(date('M')." ".date('d').", ".date('Y')." 11:59pm"); } else{ $end = strtotime('next Friday, 11:59pm', $time); } $array = array('Saturday' => 0 , 'Sunday' => 0 , 'Monday' => 0 , 'Tuesday' => 0 , 'Wednesday' => 0 , 'Thursday' => 0 , 'Friday' => 0); $ads_array = $array; $date_type = 'l'; $pt->cat_type = 'this_week'; $pt->chart_title = $lang->this_week; $pt->chart_text = date('y/M/d',$start)." To ".date('y/M/d',$end); } elseif ($type == 'this_month') { $start = strtotime("1 ".date('M')." ".date('Y')." 12:00am"); $end = strtotime(cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y'))." ".date('M')." ".date('Y')." 11:59pm"); if (cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y')) == 31) { $array = array('01' => 0 ,'02' => 0 ,'03' => 0 ,'04' => 0 ,'05' => 0 ,'06' => 0 ,'07' => 0 ,'08' => 0 ,'09' => 0 ,'10' => 0 ,'11' => 0 ,'12' => 0 ,'13' => 0 ,'14' => 0 ,'15' => 0 ,'16' => 0 ,'17' => 0 ,'18' => 0 ,'19' => 0 ,'20' => 0 ,'21' => 0 ,'22' => 0 ,'23' => 0,'24' => 0 ,'25' => 0 ,'26' => 0 ,'27' => 0 ,'28' => 0 ,'29' => 0 ,'30' => 0 ,'31' => 0); }elseif (cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y')) == 30) { $array = array('01' => 0 ,'02' => 0 ,'03' => 0 ,'04' => 0 ,'05' => 0 ,'06' => 0 ,'07' => 0 ,'08' => 0 ,'09' => 0 ,'10' => 0 ,'11' => 0 ,'12' => 0 ,'13' => 0 ,'14' => 0 ,'15' => 0 ,'16' => 0 ,'17' => 0 ,'18' => 0 ,'19' => 0 ,'20' => 0 ,'21' => 0 ,'22' => 0 ,'23' => 0,'24' => 0 ,'25' => 0 ,'26' => 0 ,'27' => 0 ,'28' => 0 ,'29' => 0 ,'30' => 0); }elseif (cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y')) == 29) { $array = array('01' => 0 ,'02' => 0 ,'03' => 0 ,'04' => 0 ,'05' => 0 ,'06' => 0 ,'07' => 0 ,'08' => 0 ,'09' => 0 ,'10' => 0 ,'11' => 0 ,'12' => 0 ,'13' => 0 ,'14' => 0 ,'15' => 0 ,'16' => 0 ,'17' => 0 ,'18' => 0 ,'19' => 0 ,'20' => 0 ,'21' => 0 ,'22' => 0 ,'23' => 0,'24' => 0 ,'25' => 0 ,'26' => 0 ,'27' => 0 ,'28' => 0 ,'29' => 0); }elseif (cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y')) == 28) { $array = array('01' => 0 ,'02' => 0 ,'03' => 0 ,'04' => 0 ,'05' => 0 ,'06' => 0 ,'07' => 0 ,'08' => 0 ,'09' => 0 ,'10' => 0 ,'11' => 0 ,'12' => 0 ,'13' => 0 ,'14' => 0 ,'15' => 0 ,'16' => 0 ,'17' => 0 ,'18' => 0 ,'19' => 0 ,'20' => 0 ,'21' => 0 ,'22' => 0 ,'23' => 0,'24' => 0 ,'25' => 0 ,'26' => 0 ,'27' => 0 ,'28' => 0); } $ads_array = $array; $pt->month_days = count($array); $date_type = 'd'; $pt->cat_type = 'this_month'; $pt->chart_title = $lang->this_month; $pt->chart_text = date("M"); } elseif ($type == 'this_year') { $start = strtotime("1 January ".date('Y')." 12:00am"); $end = strtotime("31 December ".date('Y')." 11:59pm"); $array = array('01' => 0 ,'02' => 0 ,'03' => 0 ,'04' => 0 ,'05' => 0 ,'06' => 0 ,'07' => 0 ,'08' => 0 ,'09' => 0 ,'10' => 0 ,'11' => 0 ,'12' => 0); $ads_array = $array; $date_type = 'm'; $pt->cat_type = 'this_year'; $pt->chart_title = $lang->this_year; $pt->chart_text = date("Y"); } $day_start = strtotime(date('M')." ".date('d').", ".date('Y')." 12:00am"); $day_end = strtotime(date('M')." ".date('d').", ".date('Y')." 11:59pm"); $this_day_ads_earn = $db->rawQuery("SELECT SUM(amount) AS sum FROM ".T_ADS_TRANS." c WHERE `time` >= ".$day_start." AND `time` <= ".$day_end." AND type = 'video' AND video_owner = ".$pt->user->id); //$this_day_video_earn = $db->rawQuery("SELECT * FROM ".T_VIDEOS_TRSNS." c WHERE `time` >= ".$day_start." AND `time` <= ".$day_end." AND user_id = ".$pt->user->id); $this_day_video_earn = $db->rawQuery("SELECT * FROM u_paid_videos c WHERE `time` >= ".$day_start." AND `time` <= ".$day_end." AND user_id_uploaded = ".$pt->user->id); $day_net = 0; foreach ($this_day_video_earn as $tr) { if ($tr->currency == "USD") { //$day_net = $day_net + ($tr->amount - $tr->admin_com); $day_net = $day_net + ($tr->earned_amount); } } $today_earn = $this_day_ads_earn[0]->sum + $day_net ; $month_start = strtotime("1 ".date('M')." ".date('Y')." 12:00am"); $month_end = strtotime(cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y'))." ".date('M')." ".date('Y')." 11:59pm"); $this_month_ads_earn = $db->rawQuery("SELECT SUM(amount) AS sum FROM ".T_ADS_TRANS." c WHERE `time` >= ".$month_start." AND `time` <= ".$month_end." AND type = 'video' AND video_owner = ".$pt->user->id); //$this_month_video_earn = $db->rawQuery("SELECT * FROM ".T_VIDEOS_TRSNS." c WHERE `time` >= ".$month_start." AND `time` <= ".$month_end." AND user_id = ".$pt->user->id); $this_month_video_earn = $db->rawQuery("SELECT * FROM u_paid_videos c WHERE `time` >= ".$month_start." AND `time` <= ".$month_end." AND user_id_uploaded = ".$pt->user->id); $month_net = 0; foreach ($this_month_video_earn as $tr) { if ($tr->currency == "USD") { //$month_net = $month_net + ($tr->amount - $tr->admin_com); $month_net = $month_net + ($tr->earned_amount); } } $month_earn = $this_month_ads_earn[0]->sum + $month_net ; //$trans = $db->where('user_id',$user->id)->orderBy('id','DESC')->get(T_VIDEOS_TRSNS); $trans = $db->where('user_id_uploaded',$user->id)->orderBy('id_user')->get('u_paid_videos'); $ads_trans = $db->where('time',$start,'>=')->where('time',$end,'<=')->where('video_owner',$pt->user->id)->where('type','video')->get(T_ADS_TRANS); $total_ads = 0; if (!empty($ads_trans)) { foreach ($ads_trans as $key => $ad) { if ($ad->time >= $start && $ad->time <= $end) { $day = date($date_type,$ad->time); if (in_array($day, array_keys($ads_array))) { $ads_array[$day] += $ad->amount; $total_ads += $ad->amount; } } } } $ads_list = ""; $total_earn = 0; if (!empty($trans)) { foreach ($trans as $tr) { //$video = PT_GetVideoByID($tr->video_id, 0, 0, 2); $video = PT_GetVideoByID($tr->id_video, 0, 0, 2); $user_data = PT_UserData($tr->id); $currency = ""; $admin_currency = ""; $net = 0; if ($tr->currency == "USD") { $currency = "$"; //$admin_currency = "$".$tr->admin_com; $net = $tr->earned_amount; } else if($tr->currency == "EUR"){ $currency = "€"; //$admin_currency = "€".$tr->admin_com; //$net = $tr->amount - $tr->admin_com; $net = $tr->earned_amount; } elseif ($tr->currency == "EUR_PERCENT") { $currency = "€"; //$admin_currency = $tr->admin_com."%"; //$net = $tr->amount - ($tr->admin_com * $tr->amount)/100; $net = $tr->earned_amount; } elseif ($tr->currency == "USD_PERCENT") { $currency = "$"; //$admin_currency = $tr->admin_com."%"; //$net = $tr->amount - ($tr->admin_com * $tr->amount)/100; $net = $tr->earned_amount; } if ($tr->time >= $start && $tr->time <= $end) { $day = date($date_type,$tr->time); if (in_array($day, array_keys($array))) { $array[$day] += $net; } } $total_earn = $total_earn + (float)$net; if (!empty($video) && !empty($user_data)) { **$ads_list .= PT_LoadPage('transactions/list',array(** 'ID' => $tr->id, 'PAID_USER' => substr($user_data->name, 0,20), 'PAID_URL' => $user_data->url, 'USER_NAME' => $user_data->username, 'VIDEO_NAME' => substr($video->title, 0,20) , 'VIDEO_URL' => $video->url, 'VIDEO_ID_' => PT_Slug($video->title, $video->video_id), 'AMOUNT' => $tr->earned_amount, "CURRENCY" => $currency, "A_CURRENCY" => $admin_currency, "NET" => $net, "TIME" => PT_Time_Elapsed_String($tr->time) )); } } } $total_earn = $total_earn + $total_ads; $pt->array = implode(', ', $array); $pt->ads_array = implode(', ', $ads_array); $pt->page_url_ = $pt->config->site_url.'/transactions'; $pt->title = $lang->earnings . ' | ' . $pt->config->title; $pt->page = "transactions"; $pt->description = $pt->config->description; $pt->keyword = @$pt->config->keyword; $pt->currency = $currency; $pt->content = PT_LoadPage('transactions/content',array( 'CURRENCY' => $currency, 'ADS_LIST' => $ads_list, 'TOTAL_EARN' => $total_earn, 'TODAY_EARN' => $today_earn, 'MONTH_EARN' => $month_earn )); any help/guidance/suggestion is appreciated
  9. Much thanks again for your replies. It appears that when I added your: if (!IS_LOGGED) { header("Location: " . PT_Link('login')); exit(); } and added this code back into another file: <?php if ($pt->second_page == 'about') echo "<meta name='robots' content='noindex'>"; ?> that my goal has been reached of blocking web searches of ../@username, but having ../@username available after login. Does that seem correct? I'm surprised. If you suspect I don't have something correct, please let me know, but I cleared the cache and tested in chrome, firefox and bing. I look forward to your comments.
  10. Much thanks for all the replies. Regarding "the author of the code, who does have knowledge of and access to the whole script, cannot solve this", I believe he just didn't want to delve into it currently, based on his 'for now' remark. I understand that most scripts are imperfect, but I'm trying to improve this one as I go, one step at a time, and this particular issue presently. Regarding "if adding the check for $_SESSION[username] isn't working then that's not where the username is being stored", yes, you're right, it is stored in the db > users table > 'username' column. Regarding "the check failed, but the login page properly detected you were logged in", that makes sense, so is there a solution that could instruct: even though the users' profile pages are blocked ( ../@username) from web searches, once a user is logged in and @username is selected, then ../@username page is available to visit/view? I look forward to ant additional guidance.
  11. Thanks for your reply. Sorry for any confusion. "session_start()" appears in my initial posting. I'm trying to "have a User’s profile page only display to Users who are logged into the site", and not have any profile pages display in any web searches (only be available to display to logged in users). any additional help is appreciated
  12. Thanks again for your reply. Here's the .htaccess file: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^$ index.php?link1=home [NC,QSA] RewriteRule ^reset-password/([^\/]+)(\/|)$ index.php?link1=reset-password&code=$1 [NC,QSA] RewriteRule ^confirm/(.*)/(.*)$ index.php?link1=confirm&code=$1&email=$2 [NC,QSA] RewriteRule ^two_factor_login/$ index.php?link1=two_factor_login [NC,QSA] RewriteRule ^two_factor_submit/$ index.php?link1=two_factor_submit [NC,QSA] RewriteRule ^v/(.*)$ index.php?v=$1 [NC,QSA] RewriteRule ^api/v(([0-9])([.][0-9]+))(\/|)$ api.php?v=$1 [QSA] RewriteRule ^admin-cp$ admincp.php [NC,QSA] RewriteRule ^admin-cp/(.*)$ admincp.php?page=$1 [NC,QSA] RewriteRule ^admin-cdn/(.*)$ admin-panel/$1 [L] RewriteRule ^videos/category/(.*)/rss(\/|)$ index.php?link1=videos&page=category&id=$1&feed=rss [NC,QSA] RewriteRule ^videos/category/(.*)/(.*)$ index.php?link1=videos&page=category&id=$1&sub_id=$2 [NC,QSA] RewriteRule ^videos/category/(.*)$ index.php?link1=videos&page=category&id=$1 [NC,QSA] RewriteRule ^videos/(.*)/rss(\/|)$ index.php?link1=videos&page=$1&feed=rss [NC,QSA] RewriteRule ^videos/(.*)$ index.php?link1=videos&page=$1 [NC,QSA] RewriteRule ^articles(\/|)$ index.php?link1=articles [NC,QSA] RewriteRule ^articles/category/(.*)(\/|)$ index.php?link1=articles&category_id=$1 [NC,QSA] RewriteRule ^articles/read/(.*)(\/|)$ index.php?link1=read&id=$1 [NC,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^aj/([^/.]+)/?$ ajax.php?type=$1&first=$2 [L,QSA] RewriteRule ^aj/([^/.]+)/([^/.]+)/?$ ajax.php?type=$1&first=$2 [L,QSA] RewriteRule ^aj/([^/.]+)/([^/.]+)/([^/.]+)/?$ ajax.php?type=$1&first=$2&second=$3 [L,QSA] RewriteRule ^edit-video/(.*)?$ index.php?link1=edit-video&id=$1 [L,QSA] RewriteRule ^watch/([^\/]+)(\/|)?$ index.php?link1=watch&id=$1 [L,QSA] RewriteRule ^watch/([^\/]+)/list/([^\/]+)(\/|)?$ index.php?link1=watch&id=$1&list=$2 [L,QSA] RewriteRule ^embed/(.*)?$ index.php?link1=embed&id=$1 [L,QSA] RewriteRule ^resend/(.*)/(.*)?$ index.php?link1=resend&id=$1&u_id=$2 [L,QSA] RewriteRule ^redirect/(.*)?$ index.php?link1=redirect&id=$1 [L,QSA] RewriteRule ^settings/(.*)/(.*)$ index.php?link1=settings&page=$1&user=$2 [NC,QSA] RewriteRule ^settings/(.*)$ index.php?link1=settings&page=$1 [NC,QSA] RewriteRule ^terms/([^\/]+)(\/|)$ index.php?link1=terms&type=$1 [QSA] RewriteRule ^go_pro(\/|)$ index.php?link1=go_pro [QSA] RewriteRule ^ads(\/|)$ index.php?link1=ads [QSA] RewriteRule ^ads/create(\/|)$ index.php?link1=create_ads [QSA] RewriteRule ^ads/edit/(\d+)(\/|)$ index.php?link1=edit_ads&id=$1 [QSA] RewriteRule ^ads/analytics/(\d+)(\/|)$ index.php?link1=ads_analytics&id=$1 [QSA] RewriteRule ^contact-us(\/|)$ index.php?link1=contact [QSA] RewriteRule ^@([^\/]+)(\/|)$ index.php?link1=timeline&id=$1 [QSA] RewriteRule ^messages/(.*)$ index.php?link1=messages&id=$1 [NC,QSA] RewriteRule ^view_analytics/(.*)$ index.php?link1=view_analytics&id=$1 [NC,QSA] RewriteRule ^video_studio/(.*)$ index.php?link1=video_studio [NC,QSA] RewriteRule ^comments/$ index.php?link1=comments [NC,QSA] RewriteRule ^dashboard/$ index.php?link1=dashboard [NC,QSA] RewriteRule ^popular_channels/$ index.php?link1=popular_channels [NC,QSA] RewriteRule ^create_article/$ index.php?link1=create_article [NC,QSA] RewriteRule ^my_articles/$ index.php?link1=my_articles [NC,QSA] RewriteRule ^edit_articles/(.*)?$ index.php?link1=edit_articles&id=$1 [NC,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\/]+)(\/|)$ index.php?link1=$1 [QSA] <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE image/x-icon AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/x-font AddOutputFilterByType DEFLATE application/x-font-truetype AddOutputFilterByType DEFLATE application/x-font-ttf AddOutputFilterByType DEFLATE application/x-font-otf AddOutputFilterByType DEFLATE application/x-font-opentype AddOutputFilterByType DEFLATE application/vnd.ms-fontobject AddOutputFilterByType DEFLATE font/ttf AddOutputFilterByType DEFLATE font/otf AddOutputFilterByType DEFLATE font/opentype BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> <IfModule mod_security.c> SecFilterScanPOST Off </IfModule> ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 190 days" </IfModule> ## EXPIRES CACHING ## # BEGIN cPanel-generated php ini directives, do not edit # Manual editing of this file may result in unexpected behavior. # To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) # For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI) <IfModule php7_module> php_value post_max_size 2024M php_value upload_max_filesize 2024M php_value output_buffering Off php_value max_execution_time 4000 php_value max_input_vars 3000 php_value max_input_time 5000 php_flag zlib.output_compression Off php_flag log_errors On php_value error_reporting 32767 php_value error_log "/home/.../public_html/error_log" </IfModule> <IfModule lsapi_module> php_value post_max_size 2024M php_value upload_max_filesize 2024M php_value output_buffering Off php_value max_execution_time 4000 php_value max_input_vars 3000 php_value max_input_time 5000 php_flag zlib.output_compression Off php_flag log_errors On php_value error_reporting 32767 php_value error_log "/home/.../public_html/error_log" </IfModule> # END cPanel-generated php ini directives, do not edit I look forward to any additional assistance
  13. Thanks for your reply, but, I'd have to guess. Maybe this: RewriteRule ^([^\/]+)(\/|)$ index.php?link1=$1 [QSA] or this? RewriteRule ^v/(.*)$ index.php?v=$1 [NC,QSA] or this? RewriteRule ^$ index.php?link1=home [NC,QSA] or? RewriteRule ^aj/([^/.]+)/([^/.]+)/([^/.]+)/?$ ajax.php?type=$1&first=$2&second=$3 [L,QSA] another bit of information, when i asked the script's developer "I want to keep the User account page from displaying in web searches... with ”noindex”..., he said to use this in the html: $pt->second_page == ‘about’ I don't know if that is at all helpful. Any additional suggestions is appreciated
  14. The php web video script that I’m using displays a User’s profile page, by simply adding (for example) …/@UserName after the url into a browser. I tried to have a User’s profile page only display to Users who are logged into the site, by adding session code: if(!isset($_SESSION['username'])){ header("Location:../login"); exit(); } like so: <?php if(!isset($_SESSION['username'])){ header("Location:../login"); exit(); } if (empty($_GET['id'])) { header("Location: " . PT_Link('')); exit(); } $username = PT_Secure($_GET['id']); $user_id = $db->where('username', $username)->getOne(T_USERS); $lists = false; if (empty($user_id)) { header("Location: " . PT_Link('')); exit(); } $pt->page_url_ = $pt->config->site_url.'/@'.$username ; $pt->second_page = 'videos'; if (!empty($_GET['page'])) { switch ($_GET['page']) { case 'liked-videos': $pt->second_page = 'liked-videos'; break; case 'about': $pt->second_page = 'about'; break; case 'play-lists': $pt->second_page = 'play-lists'; $lists = true; break; } $pt->page_url_ = $pt->config->site_url.'/@'.$username."?page=".$pt->second_page; } $user_data = PT_UserData($user_id, array( 'data' => true )); etc... but was unsuccessful. The problem is although the …/@UserName no longer displays in the browser field (and redirects to the login page) (with that additional code), once logged in, the User can’t see his Profile Page either. I also tried adding this: if(!isset($_SESSION['username'])){ header("Location:../login"); print_r($_SESSION); exit; } but I see no printed results. I have tried this: <?php session_start(); if(!isset($_SESSION['username'])){ header("Location:../login"); exit(); } but, when I select the drop-down menu > profile, it just seems to refresh the same page (that I'm on, and doesn't take me to the ../@chrisj profile page, as it did before I added this: if(!isset($_SESSION['username'])){ header("Location:../login"); exit(); } Also, the .htaccess file shows this: RewriteRule ^@([^\/]+)(\/|)$ index.php?link1=timeline&id=$1 [QSA] if that is any clue. I went ahead and asked the developer, and he simply said: “Its happening because file is same so no remedy for now”. So, now I’m looking for ideas on what I might try as a work around. just FYI -When a user logs in it sets the $_SESSION[‘username’] variable, id, etc.) I’m guessing that maybe the main page that I’m on simply refreshes (rather than redirects to the ‘Profile’ Page) is because I am (already)logged in: if(!isset($_SESSION['username'])){ header("Location:../login"); So, is there a solution that might instruct to say something like 'if already logged in go to @ the username’s profile page? something like: if (IS_LOGGED == true) { any additional suggestions are welcomed
  15. Thanks for all the replies/help. how can I test to see if it successfully facilitates the user/member account pages not appearing in searches?
×
×
  • 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.