"; } //convert splitted url parts to $ec variables $ec_topic = $url_part_1; $ec_partner_id = $url_part_2; $ec_article = $url_part_3; $ec_search_title= explode(".html",$url_part_3); $ec_search_title= str_replace("-"," ",$ec_search_title[0]); $redirect_page = "http://www.evancarmichael.com"; // default redirect page $recent_searches = ""; $ec_keywords = ""; $page_not_found = ""; $se_keywords = ""; $ec_meta_description =""; $ec_partner_fname = ""; $ec_partner_lname = ""; $ec_article_title_display =""; $topsecion_ad= ""; $content_type= ""; $sub_header = ""; $left_side = ""; $right_side = ""; $ec_topic_id = ""; $check_db_partnerid_topic = ""; $page_title = ""; $partner_link = ""; $ec_partner_pic = ""; $ec_partner_bio = ""; $ec_partner_rank = ""; $ec_partner_link = ""; $ec_partner_email = ""; $author_pdf_url = ""; //save fb like stats if($url_part_3 == "fblike.php"){ //echo "fblike.php"; include_once($temp_vhost.'/includes/fblike.php'); } //set information for left,right,sub header,page_title,meta_description for each content type //article if($url_part_1==true && $url_part_2==true && $url_part_3==true && $url_part_3 != 'summary.php'){ //article page //articles table query $res_art = mysql_query("SELECT articleID,titleDisplay,completeText,overview,keywords FROM Articles WHERE partnerID='$ec_partner_id' AND title='$ec_search_title'") or die ("cant select ".mysql_error()); $count_r_art = mysql_num_rows($res_art); $check_db_article_title = $count_r_art; // 1 or 0 while($row_art = mysql_fetch_array($res_art)){ $ec_article_title_display = stripslashes($row_art['titleDisplay']); $article_id = $row_art['articleID']; $article_complete_text = $row_art['completeText']; $article_overview = $row_art['overview']; //$ec_keywords = $row_art['keywords']; //echo "** $url"; //get recent article searches $sel_s_kw = mysql_query("SELECT keywords,url FROM se_keywords WHERE url='".$url."' ORDER BY id DESC") or die ("cant select ".mysql_error()); while($row_s_kw = mysql_fetch_array($sel_s_kw)){ $se_keywords = $row_s_kw['keywords']; $se_keywords = str_replace(array(".com","?"),"",$se_keywords); $se_keyword_link = "$se_keywords"; $recent_searches .= "$se_keyword_link, "; } $recent_searches = substr_replace($recent_searches,"",-2); $ec_keywords = $se_keywords; //get article tags to use as meta keyword tag $sel_tags = mysql_query("SELECT Tag FROM Tags WHERE ArticleID='".$article_id."' LIMIT 10") or die ("cant select ".mysql_error()); while($row_tags = mysql_fetch_array($sel_tags)){ $get_tags = $row_tags['Tag']; $all_tags .= ", $get_tags"; } } $res_part = mysql_query("SELECT partnerID,firstName,lastName,bio,topic,link,emailAddress,imagePath,ReferralLink,rank,TLA FROM Partners WHERE partnerID='$ec_partner_id' AND topic='$ec_topic'") or die ("cant select ".mysql_error()); $count_r_part = mysql_num_rows($res_part); $check_db_partnerid_topic = $count_r_part; // 1 or 0 while($row_part = mysql_fetch_array($res_part)){ $ec_partner_fname = $row_part['firstName']; $ec_partner_lname = $row_part['lastName']; $ec_partner_bio = $row_part['bio']; $ec_partner_link = $row_part['link']; $ec_partner_email = $row_part['emailAddress']; $ec_partner_pic = $row_part['imagePath']; $ec_partner_referral_link = $row_part['ReferralLink']; $ec_partner_rank = $row_part['rank']; $ec_partner_tla = $row_part['TLA']; $partner_link = $ec_partner_link; } //topic table query $res_top = mysql_query("SELECT topicID,Sponsor,AdSense,TLA,commentsTopic FROM Topics WHERE Topic='$ec_topic'") or die ("cant select ".mysql_error()); $count_r_top = mysql_num_rows($res_top); $check_db_topic = $count_r_top; // 1 or 0 while($row_top = mysql_fetch_array($res_top)){ $ec_topic_id = $row_top['topicID']; $topic_sponsor = $row_top['Sponsor']; $topic_adsense = $row_top['AdSense']; $ec_topic_tla = $row_top['TLA']; $ec_topic_comments = $row_top['commentsTopic']; } if($check_db_article_title==true){ $ec_keywords_display = ""; if($ec_keywords == true){ $ec_keywords_display = "($ec_keywords)"; } $page_title="$ec_article_title_display $ec_keywords_display"; //$ec_meta_description= "$ec_article_title_display $ec_keywords_display"; $ec_meta_description = "$article_overview"; $ec_meta_keywords = "$ec_partner_fname $ec_partner_lname$all_tags"; //default content parts $topsecion_ad= "ads_sub_header_a"; $content_type= "article_author_default"; $sub_header = "article_sub_header_default"; $left_side = "authors_default_left_side"; $right_side = "default_right_side"; } else { $page_not_found = true; $redirect_page = "http://www.evancarmichael.com/$ec_topic/$ec_partner_id/summary.php"; } } //summary.php elseif($url_part_1==true && $url_part_2==true && $url_part_3==true && $url_part_3=='summary.php'){ // author summary page $res_part = mysql_query("SELECT partnerID,firstName,lastName,bio,topic,link,emailAddress,imagePath,ReferralLink,rank,TLA,keywords FROM Partners WHERE partnerID='$ec_partner_id' AND topic='$ec_topic'") or die ("cant select ".mysql_error()); $count_r_part = mysql_num_rows($res_part); $check_db_partnerid_topic = $count_r_part; // 1 or 0 while($row_part = mysql_fetch_array($res_part)){ $ec_partner_fname = $row_part['firstName']; $ec_partner_lname = $row_part['lastName']; $ec_partner_bio = $row_part['bio']; $ec_partner_link = $row_part['link']; $ec_partner_email = $row_part['emailAddress']; $ec_partner_pic = $row_part['imagePath']; $ec_partner_referral_link = $row_part['ReferralLink']; $ec_partner_rank = $row_part['rank']; $ec_partner_tla = $row_part['TLA']; $ec_part_kw = $row_part['keywords']; $partner_link = $ec_partner_link; //get recent article searches $sel_s_kw = mysql_query("SELECT keywords FROM se_keywords WHERE url='$url' ORDER BY id DESC") or die ("cant select ".mysql_error()); while($row_s_kw = mysql_fetch_array($sel_s_kw)){ $se_keywords = $row_s_kw['keywords']; $se_keywords = str_replace(".com","",$se_keywords); $se_keyword_link = "$se_keywords"; $recent_searches .= "$se_keyword_link, "; } $recent_searches = substr_replace($recent_searches,"",-2); $ec_part_kw = $se_keywords; } //get article tags to use as meta keyword tag $sel_tags = mysql_query("SELECT Tag FROM Tags WHERE PartnerID='".$ec_partner_id."' LIMIT 10 ") or die ("cant select ".mysql_error()); while($row_tags = mysql_fetch_array($sel_tags)){ $get_tags = $row_tags['Tag']; $all_tags .= ", $get_tags"; } //topic query $res_top = mysql_query("SELECT topicID,Sponsor,AdSense,TLA,commentsTopic FROM Topics WHERE Topic='$ec_topic'") or die ("cant select ".mysql_error()); $count_r_top = mysql_num_rows($res_top); $check_db_topic = $count_r_top; // 1 or 0 while($row_top = mysql_fetch_array($res_top)){ $ec_topic_id = $row_top['topicID']; $topic_sponsor = $row_top['Sponsor']; $topic_adsense = $row_top['AdSense']; $ec_topic_tla = $row_top['TLA']; $ec_topic_comments = $row_top['commentsTopic']; } if($check_db_partnerid_topic==true){ $ec_keywords_display = ""; if($ec_part_kw == true){ $ec_keywords_display = "($ec_part_kw)"; } $page_title="$ec_partner_fname $ec_partner_lname Articles $ec_keywords_display"; $ec_meta_description= "$ec_partner_fname $ec_partner_lname $ec_topic Articles. $ec_partner_bio "; $ec_meta_keywords = "$ec_partner_fname $ec_partner_lname$all_tags"; //default content parts $sub_header = "article_sub_header_default"; $content_type= "article_summary_default"; $right_side = "default_right_side"; } } //topic/index.html elseif($url_part_1==true && ($url_part_2==false || $url_part_2=="index.html") && $url_part_1 != "tags"){ //$page_title="$ec_topic Articles ($ec_topic_comments)"; //$ec_meta_description= "$ec_topic Articles ($ec_topic_comments)"; $res_top = mysql_query("SELECT topicID,Sponsor,AdSense,TLA,commentsTopic,keywords FROM Topics WHERE Topic='$ec_topic'") or die ("cant select ".mysql_error()); $count_r_top = mysql_num_rows($res_top); $check_db_topic = $count_r_top; // 1 or 0 while($row_top = mysql_fetch_array($res_top)){ $ec_topic_id = $row_top['topicID']; $topic_sponsor = $row_top['Sponsor']; $topic_adsense = $row_top['AdSense']; $ec_topic_tla = $row_top['TLA']; $topsecion_ad = "ads_sub_header_a"; $ec_topic_comments= $row_top['commentsTopic']; $topic_keyword = $row_top['keywords']; //get recent article searches $sel_s_kw = mysql_query("SELECT keywords FROM se_keywords WHERE url='$url' ORDER BY id DESC") or die ("cant select ".mysql_error()); while($row_s_kw = mysql_fetch_array($sel_s_kw)){ $se_keywords = $row_s_kw['keywords']; $se_keywords = str_replace(".com","",$se_keywords); $se_keyword_link = "$se_keywords"; $recent_searches .= "$se_keyword_link, "; } $recent_searches = substr_replace($recent_searches,"",-2); $ec_topic_kw = $se_keywords; $ec_keywords_display = ""; if($ec_topic_kw == true){ $ec_keywords_display = "($ec_topic_kw)"; } $page_title="$ec_topic Articles $ec_keywords_display"; $ec_meta_description= "$ec_topic Articles $ec_keywords_display"; $ec_meta_keywords = "$ec_topic $topic_keyword"; } //default content parts $content_type= "topic_index_default"; $right_side = "default_right_side_topic"; } else { //url error, redirect to summary, topic or root url //url article title wrong redirect to summary page $page_not_found = true; //url partner_id wrong if($check_db_partnerid_topic==false){ //redirect to summary page $redirect_page = "http://www.evancarmichael.com/$ec_topic/"; } } if($page_not_found == true){ echo ""; // echo ""; } $ec_meta_description = str_replace('"','',$ec_meta_description); ?> Contact Evan Carmichael

Contact Us

Evan, Founder, evan@evancarmichael.com
Adis, VP Operations, authors@evancarmichael.com
GT, Entrepreneur Forums Manager, gt@evancarmichael.com
Stefanie, Kiva Manager
Gretchen, Marketing Manager
Saad, Video Editor
Ed, Server Dude
Eric, Writer