diff --git a/.htaccess b/.htaccess index f39a306..148dae1 100644 --- a/.htaccess +++ b/.htaccess @@ -1,8 +1,10 @@ RewriteEngine On -RewriteBase / -RewriteCond %{HTTP_HOST} !^(www\.|$) [NC] -RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] +RewriteCond %{HTTP_HOST} !^www\. +RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] +#RewriteBase / +#RewriteCond %{HTTP_HOST} !^(www\.|$) [NC] +#RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] #RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] #RewriteRule ^(.*)$ http://%1/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f diff --git a/README.md b/README.md index f3db976..5416c52 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,27 @@ -Challenge-Framework -=================== +#PIP -Challenge framework for Contrib +PIP is a tiny application framework built for people who use a LAMP stack. PIP aims to be as simple as possible to set up and use. + +Visit [http://gilbitron.github.com/PIP](http://gilbitron.github.com/PIP/) for more information and documentation. + +## Requirements + +* PHP 5.1 or greater +* MySQL 4.1.2 or greater +* The mod_rewrite Apache module + +## Installation + +* Download PIP and extract +* Navigate to `application/config/config.php` and fill in your `base_url` +* You are ready to rock! Point your browser to your `base_url` and hopefully see a welcome message. + +## Documentation + +Visit [http://gilbitron.github.com/PIP](http://gilbitron.github.com/PIP/) to see the documentation. + +## License + +PIP is released under the MIT license. + +Want to say thanks? [Consider tipping me](https://www.gittip.com/gilbitron). diff --git a/application/config/config.php b/application/config/config.php index ca963f6..075df26 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -37,10 +37,10 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass } $api_url = "http://api2.contrib.co/request/"; $headers = array('Accept: application/json'); - -if (!file_exists('config-framework.php')) { - + +if (!file_exists('./config-framework.php')) { + $file = file_get_contents('config-template.php'); $domain = $_SERVER["HTTP_HOST"]."".$_SERVER['REQUEST_URI'];//input sitename without www @@ -52,13 +52,14 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass $domain = str_replace("www.","",$domain); $key = md5($domain); }else { - $key = md5('yourdomain.com'); + $key = md5('vnoc.com'); $d = explode('~',$domain); $user = str_replace('/','',$d[1]); $host = $_SERVER["HTTP_HOST"]; $host = str_replace("http://","",$host); $host = str_replace("www.","",$host); $url = $api_url.'getdomainbyusername?username='.$user.'&key='.$key.'&host='.$host; + $result = createApiCall($url, 'GET', $headers, array()); $data_domain = json_decode($result,true); $error = 0; @@ -68,21 +69,14 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass $data_domain = NULL; + while ($data_domain == NULL){ $url = $api_url.'getdomaininfo?domain='.$domain.'&key='.$key; $result = createApiCall($url, 'GET', $headers, array()); $data_domain = json_decode($result,true); } - /*echo "
";
-	
 
-		var_dump($data_domain[0]['DomainId']);
-	
-	echo "
"; - exit;*/ - - // if ($data_domain['success']){ $domainid = $data_domain['data']['DomainId']; $domainname = $data_domain['data']['DomainName']; $memberid = $data_domain['data']['MemberId']; @@ -92,63 +86,119 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass $account_ga = $data_domain['data']['AccountGA']; $description = stripslashes(str_replace('\n','
',$description)); - $url2 = $api_url.'getdomainattributes?domain='.$domain.'&key='.$key; - $result2 = createApiCall($url2, 'GET', $headers, array()); - $data_domain2 = json_decode($result2,true); - - - // if($data_domain2['success']){ + $url2 = $api_url.'getdomainattributes?domain='.$domain.'&key='.$key; + $result2 = createApiCall($url2, 'GET', $headers, array()); + $data_domain2 = json_decode($result2,true); - - + $keywords = $data_domain2['data']['keywords']; $color = $data_domain2['data']['template_color']; $intro_title = stripslashes($data_domain2['data']['intro_title']); $intro_description = stripslashes($data_domain2['data']['intro_description']); $category = $data_domain2['data']['category']; $featured_challenge = ''; $featured_challenge = $data_domain2['data']['featured_challenge']; - /*$array_counter = count($data_domain2); - if($array_counter == 5){ - $featured_challenge = $data_domain2[4]['featured_challenge']; + + if (isset($data_domain2['data']['background_url'])){ + $background_url = $data_domain2['data']['background_url']; + }else { + $background_url = ""; } - if($array_counter == 6){ - $featured_challenge = $data_domain2[5]['featured_challenge']; - }*/ - if($featured_challenge==''){ $featured_challenge='222'; } + if (isset($data_domain2['data']['footer_html'])){ + $footer_html = $data_domain2['data']['footer_html']; + }else { + $footer_html = ""; + } + if($featured_challenge==''){ $featured_challenge='0'; } - - - - - - /*}else{ - $error++; - } - - - - }else { - $error++; - }*/ + if ($featured_challenge != '0'){ + + $info_attributes3 = $api_url.'getFeaturedChallenge?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_challenge = json_decode($result3,true); + + + if (isset($data_challenge['success'])){ + $featured_array = $data_challenge['data']; + }else { + $featured_array = array(); + } + }else { + $featured_array = array(); + } + + + + if ($featured_challenge != '0'){ + + $info_attributes3 = $api_url.'GetChallengeLinks?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_link = json_decode($result3,true); - $info_attributes3 = $api_url.'getFeaturedChallenge?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; - $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); - $data_challenge = json_decode($result3,true); + if (isset($data_link['success'])){ + $link_array = $data_link['data']; + }else { + $link_array = array(); + } + + }else { + $link_array = array(); + } + + + + if ($featured_challenge != '0'){ + + $info_attributes3 = $api_url.'GetChallengeRequirements?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_req = json_decode($result3,true); + + if (isset($data_req['success'])){ + $req_array = $data_req['data']; + }else { + $req_array = array(); + } + + }else { + $req_array = array(); + } + + + if ($featured_challenge != '0'){ + $info_attributes3 = $api_url.'GetChallengeChallengers?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_gers = json_decode($result3,true); + + if (isset($data_gers['success'])){ + $gers_array = $data_gers['data']; + }else { + $gers_array = array(); + } - $ChallengeId = $data_challenge['data'][0]['ChallengeId']; - $ChallengeTitle = $data_challenge['data'][0]['ChallengeTitle']; - $ChallengeDesc = $data_challenge['data'][0]['ChallengeDesc']; - $EquityPoints = $data_challenge['data'][0]['EquityPoints']; - $Slug = $data_challenge['data'][0]['Slug']; - $short_desc = $data_challenge['data'][0]['short_desc']; - $Photo = $data_challenge['data'][0]['Photo']; - $MoreDetails = $data_challenge['data'][0]['MoreDetails']; - $Submission_To = $data_challenge['data'][0]['Submission_To']; - $remaining_days = $data_challenge['data'][0]['remaining_days']; + }else { + $gers_array = array(); + + } + + + if ($featured_challenge != '0'){ + $info_attributes3 = $api_url.'GetChallengeDiscussions?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_dis = json_decode($result3,true); + + if (isset($data_dis['success'])){ + $discussion_array = $data_dis['data']; + }else { + $discussion_array = array(); + } + + } else { + $discussion_array = array(); + } + //----------------------------------------------------------------------------- @@ -159,13 +209,9 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass $not_featured_sites = json_decode($result_notfeatured,true); - - - - $limit = 4; - $counter = 0; - while($counter < $limit){ + for ($counter=0;$counter 0)){ - if(count($related_sites) > 0){ $counter = 0; $limit_related = 4; - foreach($related_sites as $related){ + foreach($related_sites['data'] as $k=>$related){ - $related_sites2[$counter]['name'] = $related['data'][$counter]['DomainName']; - $related_sites2[$counter]['id'] = $related['data'][$counter]['DomainId']; - $related_sites2[$counter]['logo'] = $related['data'][$counter]['Logo']; + $related_sites2[$counter]['name'] = $related['DomainName']; + $related_sites2[$counter]['id'] = $related['DomainId']; + $related_sites2[$counter]['logo'] = $related['Logo']; $counter++; - } @@ -298,8 +327,40 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass $result = createApiCall($url, 'GET', $headers, array()); $data_ads = json_decode($result,true); $footer_banner = html_entity_decode(base64_decode($data_ads['data']['content'])); - + //get related domains + $url = $api_url.'getrelateddomains?domain='.$domain.'&limit=15'; + $result = createApiCall($url, 'GET', $headers, array()); + $data_domains = json_decode($result,true); + if ($data_domains['success']){ + $related_domains = $data_domains['data']; + } + + //get fund campaigns + $url = $api_url.'getfundcampaigns'; + $result = createApiCall($url, 'GET', $headers, array()); + $items = json_decode($result,true); + if ($items['success']){ + $campaigns = $items['data']; + } + + //get micronews + $url = $api_url.'getmicronews?domain='.$domain.'&key='.$key.'&limit=3'; + $result = createApiCall($url, 'GET', $headers, array()); + $news = json_decode($result,true); + if ($news['success']){ + $micronews = $news['data']; + } + + // if no keywords presented at domaininfo -> process this + if ($keywords == "") { + $api1_url = 'http://api1.contrib.co/request/'; + $url = $api1_url.'DomainKeywords?key='.$key.'&domain='.$domain; + $result = createApiCall($url, 'GET', $headers, array()); + $res_keywords = json_decode($result,true); + $keywords = $res_keywords['data']['keywords']; + } + //create file $file = str_replace('{{DOMAIN}}',$domain , $file); @@ -315,37 +376,33 @@ function createApiCall($url, $method, $headers, $data = array(),$user=null,$pass $file = str_replace('{{INTRO_TITLE}}',strip_tags($intro_title),$file); $file = str_replace('{{SMALL_DESCRIPTION}}',strip_tags($intro_description),$file); $file = str_replace('{{CATEGORYID}}',$category,$file); + $file = str_replace('{{BACKGROUND_URL}}',$background_url,$file); $file = str_replace('{{FOOTER_BANNER}}',$footer_banner, $file); + $file = str_replace('{{FOOTER_HTML}}',$footer_html, $file); // $file = str_replace('{{HEADER_SCRIPT}}',$header_script,$file); // $file = str_replace('{{CUSTOM_HTML}}',$custom_html,$file); // $file = str_replace('{{DESC_GRAPHIC}}',$descriptive_graphics_url,$file); $file = str_replace('{{FEATURED_CHALLENGE}}',strip_tags($featured_challenge),$file); $file = str_replace('{{AFF_LINK}}',$domain_affiliate_link, $file); - - $file = str_replace('{{CHALLENGE_ID}}',$ChallengeId,$file); - $file = str_replace('{{CHALLENGE_TITLE}}',strip_tags($ChallengeTitle),$file); - $file = str_replace('{{CHALLENGE_DESC}}',strip_tags($ChallengeDesc),$file); - $file = str_replace('{{ECQUITY_POINTS}}',$EquityPoints,$file); - $file = str_replace('{{SLUG}}',$Slug,$file); - $file = str_replace('{{SHORT_DESC}}',strip_tags($short_desc),$file); - $file = str_replace('{{PHOTO}}',$Photo,$file); - $file = str_replace('{{MORE_DETAILS}}',strip_tags($MoreDetails),$file); - $file = str_replace('{{SUBMISSION_TO}}',$Submission_To,$file); - $file = str_replace('{{REMAINING_DAYS}}',$remaining_days,$file); + $file = str_replace('{{KEYWORDS}}',$keywords ,$file); + $file = str_replace('{{FEATUREDC}}',var_export($featured_array, true), $file); + $file = str_replace('{{CDISCUSSIONS}}',var_export($discussion_array, true), $file); $file = str_replace('{{NOT_FEATURED_SITES}}',var_export($not_featured_sites2, true), $file); $file = str_replace('{{RELATED_SITES}}',var_export($related_sites2, true), $file); $file = str_replace('{{PARTNERS}}',var_export($partners, true), $file); $file = str_replace('{{JOBS}}',var_export($jobs, true), $file); + $file = str_replace('{{RELATED_DOMAINS}}',var_export($related_domains, true), $file); + $file = str_replace('{{FUND_CAMPAIGNS}}',var_export($campaigns, true), $file); + $file = str_replace('{{MICRONEWS}}',var_export($micronews, true), $file); + $file = str_replace('{{CLINKS}}',var_export($link_array, true), $file); + $file = str_replace('{{CREQUIREMENTS}}',var_export($req_array, true), $file); + $file = str_replace('{{CHALLENGERS}}',var_export($gers_array, true), $file); - file_put_contents('config-framework.php', $file); } include "./config-framework.php"; - - - if(defined('ENV')) //$config['base_url'] = 'http://localhost/challengenew/'; diff --git a/application/controllers/blog.php b/application/controllers/blog.php index c7afd2e..ff0b5bf 100644 --- a/application/controllers/blog.php +++ b/application/controllers/blog.php @@ -4,6 +4,27 @@ class Blog extends Controller { private $ichallenge_feed_url = "http://ichallenge.com/feed/"; + function index(){ + + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $info_attributes = $api->getdomainattributes(); + $featured_id = $api->getfeaturedid(); + $template = $this->loadView('blog'); + $template->set('featured_id',$featured_id); + $template->set('info',$info); + $template->set('info_attributes',$info_attributes); + $template->set('footer_banner', $api->getbanner()); + $template->set('micronews', $api->getmicronews()); + $template->set('f',$api->getfeaturedchallenge()); + $template->set('related',$api->getnotfeatured()); + $template->set('newsfeeds',$api->getnewsfeeds()); + $template->render(); + + + } + function rollingblog(){ $simplepie = $this->loadModel('ApiModel2'); diff --git a/application/controllers/challenge.php b/application/controllers/challenge.php new file mode 100644 index 0000000..2ef044c --- /dev/null +++ b/application/controllers/challenge.php @@ -0,0 +1,103 @@ +loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $test = 0; + $domain_id = $info['domainid']; + $domain = $info['domain']; + $key = md5('vnoc.com'); + $info_attributes = $api->getdomainattributes(); + $related_challenges = $api->getrelatedchallenges(); + $getnotfeatured = $api->getnotfeatured(); + $getrelateddomains = $api->getrelateddomains(); + $getfunding = $api->getfunding(); + //$feed = $api->rollingblog(); + $featured_id = $helper->segment(3); + + $info_attributes3 = $this->api_url.'getFeaturedChallenge?domain='.$domain.'&key='.$key.'&featured_id='.$featured_id; + $result3 = $this->createApiCall($info_attributes3, 'GET', $this->headers, array()); + $data_challenge = json_decode($result3,true); + + + if (isset($data_challenge['success'])){ + $getfeaturedchallenge = $data_challenge['data'][0]; + }else { + $getfeaturedchallenge = array(); + } + + + //$getfeaturedchallenge = $api->getfeaturedchallenge(); + + // echo '
';
+		// print_r($getfeaturedchallenge);
+		// echo '
'; + // die(); + + $template = $this->loadView('details'); + $template->set('featured_id',$featured_id); + $template->set('follow_count',$api->getleadscount()); + $template->set('info', $info); + $template->set('test', $test); + //$template->set('feed',$feed); + $template->set('notfeatured',$notfeatured); + $template->set('getfeaturedchallenge',$getfeaturedchallenge); + $template->set('getrelateddomains',$getrelateddomains); + $template->set('getnotfeatured',$getnotfeatured); + $template->set('getfunding',$getfunding); + $template->set('info_attributes',$info_attributes); + $template->set('related_challenges',$related_challenges); + $template->set('footer_banner', $api->getbanner()); + $template->set('cdiscussions', $api->getchallengediscussions()); + $template->render(); + } + + +} + +?> \ No newline at end of file diff --git a/application/controllers/home.php b/application/controllers/home.php index 1c5be37..c314261 100644 --- a/application/controllers/home.php +++ b/application/controllers/home.php @@ -2,7 +2,7 @@ class Home extends Controller { - function index() + function indexbackup() { $notfeatured = array(); $counter = 0; @@ -14,6 +14,8 @@ function index() $info_attributes = $api->getdomainattributes(); $related_challenges = $api->getrelatedchallenges(); $getnotfeatured = $api->getnotfeatured(); + $getrelateddomains = $api->getrelateddomains(); + $getfunding = $api->getfunding(); $feed = $api->rollingblog(); @@ -28,13 +30,94 @@ function index() $template->set('feed',$feed); $template->set('notfeatured',$notfeatured); $template->set('getfeaturedchallenge',$getfeaturedchallenge); + $template->set('getrelateddomains',$getrelateddomains); $template->set('getnotfeatured',$getnotfeatured); + $template->set('getfunding',$getfunding); $template->set('info_attributes',$info_attributes); $template->set('related_challenges',$related_challenges); $template->set('footer_banner', $api->getbanner()); $template->render(); } +function index() + { + $notfeatured = array(); + $counter = 0; + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $test = 0; + $domain_id = $info['domainid']; + $info_attributes = $api->getdomainattributes(); + $related_challenges = $api->getrelatedchallenges(); + $getnotfeatured = $api->getnotfeatured(); + $getrelateddomains = $api->getrelateddomains(); + $getfunding = $api->getfunding(); + //$feed = $api->rollingblog(); + $featured_id = $api->getfeaturedid(); + $getfeaturedchallenge = $api->getfeaturedchallenge(); + + // echo '
';
+		// print_r($getfeaturedchallenge);
+		// echo '
'; + // die(); + + $template = $this->loadView('index'); + $template->set('featured_id',$featured_id); + $template->set('follow_count',$api->getleadscount()); + $template->set('info', $info); + $template->set('test', $test); + //$template->set('feed',$feed); + $template->set('notfeatured',$notfeatured); + $template->set('getfeaturedchallenge',$getfeaturedchallenge); + $template->set('getrelateddomains',$getrelateddomains); + $template->set('getnotfeatured',$getnotfeatured); + $template->set('getfunding',$getfunding); + $template->set('info_attributes',$info_attributes); + $template->set('related_challenges',$related_challenges); + $template->set('footer_banner', $api->getbanner()); + $template->set('cdiscussions', $api->getchallengediscussions()); + $template->render(); + } + + function fund(){ + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $info_attributes = $api->getdomainattributes(); + $getrelateddomains = $api->getrelateddomains(); + $getfunding = $api->getfunding(); + + $template = $this->loadView('fund'); + $template->set('getfunding',$getfunding); + $template->set('getrelateddomains',$getrelateddomains); + $template->set('info',$info); + $template->set('info_attributes',$info_attributes); + $template->render(); + + } + + function developers() + { + + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $info_attributes = $api->getdomainattributes(); + $getrelateddomains = $api->getrelateddomains(); + $getfunding = $api->getfunding(); + + $template = $this->loadView('developers'); + $template->set('getfunding',$getfunding); + $template->set('getrelateddomains',$getrelateddomains); + $template->set('info',$info); + $template->set('info_attributes',$info_attributes); + $template->render(); + + + + } + function howtosponsor(){ $api = $this->loadModel('ApiModel'); @@ -124,6 +207,20 @@ function staffing(){ $template->render(); } + + function apps(){ + + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $info_attributes = $api->getdomainattributes(); + $template = $this->loadView('apps'); + $template->set('info_attributes',$info_attributes); + $template->set('info',$info); + $template->set('footer_banner', $api->getbanner()); + $template->render(); + + } function sitemap(){ @@ -167,6 +264,26 @@ function partners(){ $template->set('partners',$partners); $template->set('footer_banner', $api->getbanner()); $template->render(); + } + function success() + { + + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $info = $api->getdomaininfo(); + $info_attributes = $api->getdomainattributes(); + $getrelateddomains = $api->getrelateddomains(); + $getfunding = $api->getfunding(); + + $template = $this->loadView('success'); + $template->set('getfunding',$getfunding); + $template->set('getrelateddomains',$getrelateddomains); + $template->set('info',$info); + $template->set('info_attributes',$info_attributes); + $template->render(); + + + } } diff --git a/application/controllers/success.php b/application/controllers/success.php new file mode 100644 index 0000000..0981092 --- /dev/null +++ b/application/controllers/success.php @@ -0,0 +1,35 @@ +loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $email = base64_decode($helper->segment(3)); + $info = $api->getdomaininfo(); + $template = $this->loadView('success'); + $template->set('follow_count',$api->getleadscount()); + $template->set('info',$info); + $template->set('email',$email); + $template->render(); + + } + + function exists() + { + $api = $this->loadModel('ApiModel'); + $helper = $this->loadHelper('Url_helper'); + $email = base64_decode($helper->segment(3)); + $info = $api->getdomaininfo(); + $template = $this->loadView('success-exist'); + $template->set('info',$info); + $template->set('email',$email); + $template->render(); + + } + + +} + +?> \ No newline at end of file diff --git a/application/models/apimodel.php b/application/models/apimodel.php index 3f69c10..42f2f76 100644 --- a/application/models/apimodel.php +++ b/application/models/apimodel.php @@ -1,10 +1,10 @@ api_url.'GetChallengeRequirements?domain='.$this->getdomain().'&key='.$this->getkey().'&featured_id='.$featuredc[0]['ChallengeId']; + + $result3 = $this->createApiCall($info_attributes3, 'GET', $this->headers, array()); + $crequirements = json_decode($result3,true); - $info['ChallengeId'] = $ChallengeId; - $info['ChallengeTitle'] = $ChallengeTitle; - $info['ChallengeDesc'] = $ChallengeDesc ; - $info['EquityPoints'] = $EquityPoints ; - $info['Slug'] = $Slug ; - $info['short_desc'] = $short_desc; - $info['Photo'] =$Photo; - $info['MoreDetails'] = $MoreDetails; - $info['Submission_To'] = $Submission_To; - $info['remaining_days'] = $remaining_days; + $info['Requirements'] = $crequirements['data']; + $info['Challengers'] = $challengers; + return $info; @@ -196,19 +214,20 @@ function getrelatedchallenges(){ } function getleadscount(){ - $url = $this->api_url.'getdomainleadscount?domain='.$this->getdomain().'&key='.$this->getkey(); + $url = $this->api_url.'Getdomainleadscount?domain='.$this->getdomain().'&key='.$this->getkey(); $result = $this->createApiCall($url, 'GET', $this->headers, array()); $data_follow_count = json_decode($result,true); - if ($data_follow_count['success']){ - $leads = ($data_follow_count['data']['leads'] + 1 ) * 25; - }else { - $leads = 1 * 25; - } - return $leads; + if (!$data_follow_count['error']) + { + $follow_count = ($data_follow_count['data']['leads'] + 1 ) * 25; + }else { + $follow_count = 1 * 25; + } + return $follow_count; } - function rollingblog(){ + /*function rollingblog(){ $simplepie = new SimplePie(); $simplepie->set_feed_url($this->ichallenge_feed_url); @@ -218,14 +237,61 @@ function rollingblog(){ return $simplepie; - } + }*/ function getbanner(){ global $footer_banner; return $footer_banner; } + + function getrelateddomains(){ + + global $related_domains; + $domain_verticals = $related_domains; + + return $domain_verticals; + + + + } + + function getfunding(){ + + global $fund_campaigns; + $campains = $fund_campaigns; + return $campains; + + } + + function getmicronews(){ + global $micronews; + return $micronews; + } + + function getnewsfeeds(){ + $url = $this->api_url.'getnewsfeed?domain='.$this->getdomain().'&key='.$this->getkey().'&limit=3'; + $result = $this->createApiCall($url, 'GET', $this->headers, array()); + $newfeed = json_decode($result,true); + if ((isset($newfeed['success'])) && (count($newfeed['data'])>0)){ + $info = $newfeed['data']; + }else { + $info = array(); + } + + return $info; + } + + function getchallengediscussions(){ + global $cdiscussions; + return $cdiscussions; + } + + function getfeaturedid(){ + global $featured_challenge; + return $featured_challenge; + } - function createrobots(){ + function createrobots(){ // generate robots.txt if not exist $filename = ROOT_DIR .'/robots.txt'; //if(!(file_exists($filename))) { @@ -240,13 +306,6 @@ function createrobots(){ fwrite($handle, $data); } - - - - - - - } diff --git a/application/models/apimodel2.php b/application/models/apimodel2.php index ed667bf..763780c 100644 --- a/application/models/apimodel2.php +++ b/application/models/apimodel2.php @@ -4,7 +4,7 @@ class ApiModel2 extends Model { - private $api_url = "http://api.contrib.com/request/"; + private $api_url = "http://api2.contrib.co/request/"; private $ichallenge_feed_url = "http://ichallenge.com/feed/"; private $headers = array('Accept: application/json'); diff --git a/application/views/apps.php b/application/views/apps.php new file mode 100644 index 0000000..7ad9b30 --- /dev/null +++ b/application/views/apps.php @@ -0,0 +1,458 @@ + + +
+
+
+
+
+
+
+

 Contrib Apps

+
+
+
+
+
+
+
+
+
+ +
+
+ Contrib +
+
+

+ A new business model and collaboration platform for business professionals to earn equity and cash grants with premium digital assets in a flexible and transparent value creation system. +

+ VIEW +
+
+ +
+
+ SocialID +
+
+

+ SocialID establishes media distribution and identification management services on valuable, engaged networks. Creating value for companies and engaging the targeted user bases. +

+ + VIEW +
+
+
+
+ Handyman +
+
+

+ Find various experienced, and professional contractors in your area. Efficiently fulfill your home repair or remodel needs and manage your project details online and anytime. +

+ VIEW +
+
+
+
+ Eservices +
+
+

+ The marketplace for quick, paid opportunities by doing small online tasks ordered daily through a curated network of professionals. +

+ VIEW +
+
+
+
+ Referrals +
+
+

+ Offers a seamless and easy integration into premium brands while expanding distribution turning contacts and community into commerce. +

+ VIEW +
+
+
+
+ Staffing +
+
+

+ Professional and Curated Talent for short and long term organizational needs and desires. Remote, value based talent fulfillment with amazing opportunities to earn equity and cash warrants with leading organizations. +

+ VIEW +
+
+
+
+ Photostream +
+
+

+ Shoot, Stream, and Monetize. Import your social photos from popular social networks. +

+ VIEW +
+
+
+
+ Micromarkets +
+
+

+ Post your small service jobs for free. Connect and get paid with thousands of service suppliers from different Micro Markets. +

+ VIEW +
+
+
+
+ DomainDirectory +
+
+

+ Get the best URL for your website or join partnership opportunities with other related assets. The right domain name can change your business and life. We help you find, acquire, sell, build or monetize valuable domain assets. +

+ VIEW +
+
+
+
+ VentureBook +
+
+

+ The leading venture and equity network for digital assets. Create Venture Suggestions and proposals with leading and exclusive digital assets. +

+ VIEW +
+
+
+
+ Eshares +
+
+

+ The leading Equity Management and Marketplace for Technology companies in the digital economy. Join the 1,000's of tech focused companies utilizing eShares.com +

+ VIEW +
+
+
+
+ Ifund +
+
+

+ Is a software as a service collaborative funding platform for premium digital ventures. iFund is not a registered broker-dealer but offers opportunities to find and learn about great companies. +

+ VIEW +
+
+
+
+ Adrate +
+
+

+ Adrate is a unique AI program for native advertising platform with access to over a Billion placements daily. Join and let AdRate use our ad technology to make you profits. +

+ VIEW +
+
+
+
+ Ipartner +
+
+

+ Gain access to a curated network of strategic partners and expand your user base with the right partner opportunities. iPartner helps filter and attract the best partners within our premium venture opportunities. Forming a mutually beneficial and benchmarkable partnership outline. +

+ VIEW +
+
+
+
+ Linked +
+
+

+ Linking people, skills and opportunities to create the world's largest collaborative commerce and business creation system. +

+ VIEW +
+
+
+
+ Applications +
+
+

+ Applications is the new way to list and power leading digital assets and make money from your apps. Sell, Trade and Lease your code using the leading app hosting systems. Gain access to leading and exclusive scripts that help grow your business. +

+ VIEW +
+
+
+
+ Esignatures +
+
+

+ Your best practice resource for transforming your business processes to drive efficiency, automation, insight, and action. Quick and Easy and legally binding while easy management of all your legal documents. +

+ VIEW +
+
+
+
+ CookBoard +
+
+

+ Is the #1 Local Food Marketplace where you can buy and sell food items from your local chefs, local cooks in your community. +

+ VIEW +
+
+
+
+ BuilderKit +
+
+

+ Provides a fast, affordable, high quality business creation and management platform for digital assets. +

+ VIEW +
+
+
+
+ LiveRep +
+
+

+ Is a technology gamification company building and managing leading brand platforms. Our scalable, domain based platform creates niche, interactive gaming systems that match sponsors with targeted users creating synergy and engagement. +

+ VIEW +
+
+
+
+ Ichallenge +
+
+

+ Is a technology gamification company building and managing leading assets including MyChallenge, CodeChallenge, SportsChallenge and other great niche locations. Our scalable, domain based platform creates niche, interactive gaming systems that match sponsors with targeted users creating synergy and engagement. +

+ VIEW +
+
+
+
+ Bidtellect +
+
+

+ The First Open, Multi-format, Multi-device Native Marketing Platform Connecting Advertisers and Publishers to Deliver Optimized and Insightful Native Advertising at Scale. +

+ VIEW +
+
+
+
+ TalentDirect +
+
+

+ TalentDirect uses the most updated, modern technology to showcase, schedule and manage talent - making it effortless for any production, film, commercial or promotional event to make their project the best it can be. +

+ VIEW +
+
+
+
+ TalentDirect +
+
+

+ Create, publish and make your content viral. +

+ VIEW +
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/application/views/blog.php b/application/views/blog.php new file mode 100644 index 0000000..ca6bc11 --- /dev/null +++ b/application/views/blog.php @@ -0,0 +1,219 @@ + + + +
+
+
+

+
+
+ + 0):?> + $v):?> +
+ +
+
+

+     Read More + +
+
+
+
+ + + + +
+
+ +
+ + + + +
+

 Discussion Newsfeed

+
+ + + +
+
+
+
+
+ \ No newline at end of file diff --git a/application/views/config.php b/application/views/config.php new file mode 100644 index 0000000..8adb181 --- /dev/null +++ b/application/views/config.php @@ -0,0 +1,423 @@ +',$description)); + + $url2 = $api_url.'getdomainattributes?domain='.$domain.'&key='.$key; + $result2 = createApiCall($url2, 'GET', $headers, array()); + $data_domain2 = json_decode($result2,true); + + + + $color = $data_domain2['data']['template_color']; + $intro_title = stripslashes($data_domain2['data']['intro_title']); + $intro_description = stripslashes($data_domain2['data']['intro_description']); + $category = $data_domain2['data']['category']; + $featured_challenge = ''; + $featured_challenge = $data_domain2['data']['featured_challenge']; + + if (isset($data_domain2['data']['background_url'])){ + $background_url = $data_domain2['data']['background_url']; + }else { + $background_url = ""; + } + + + if($featured_challenge==''){ $featured_challenge='0'; } + + + if ($featured_challenge != '0'){ + + $info_attributes3 = $api_url.'getFeaturedChallenge?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_challenge = json_decode($result3,true); + + + if (isset($data_challenge['success'])){ + $featured_array = $data_challenge['data']; + }else { + $featured_array = array(); + } + + }else { + $featured_array = array(); + } + + + + if ($featured_challenge != '0'){ + + $info_attributes3 = $api_url.'GetChallengeLinks?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_link = json_decode($result3,true); + + if (isset($data_link['success'])){ + $link_array = $data_link['data']; + }else { + $link_array = array(); + } + + }else { + $link_array = array(); + } + + + + if ($featured_challenge != '0'){ + + $info_attributes3 = $api_url.'GetChallengeRequirements?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_req = json_decode($result3,true); + + if (isset($data_req['success'])){ + $req_array = $data_req['data']; + }else { + $req_array = array(); + } + + }else { + $req_array = array(); + } + + + if ($featured_challenge != '0'){ + $info_attributes3 = $api_url.'GetChallengeChallengers?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_gers = json_decode($result3,true); + + if (isset($data_gers['success'])){ + $gers_array = $data_gers['data']; + }else { + $gers_array = array(); + } + + }else { + $gers_array = array(); + + } + + + if ($featured_challenge != '0'){ + $info_attributes3 = $api_url.'GetChallengeDiscussions?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result3 = createApiCall($info_attributes3, 'GET', $headers, array()); + $data_dis = json_decode($result3,true); + + if (isset($data_dis['success'])){ + $discussion_array = $data_dis['data']; + }else { + $discussion_array = array(); + } + + } else { + $discussion_array = array(); + } + + + + //----------------------------------------------------------------------------- + + + $url_notfeatured = $api_url.'getnotFeaturedChallenge?domain='.$domain.'&key='.$key.'&featured_id='.$featured_challenge; + $result_notfeatured = createApiCall($url_notfeatured, 'GET', $headers, array()); + $not_featured_sites = json_decode($result_notfeatured,true); + + + + + + $limit = 4; + $counter = 0; + + while($counter < $limit){ + + $not_featured_sites2[$counter]['ChallengeId'] = $not_featured_sites['data'][$counter]['ChallengeId']; + $not_featured_sites2[$counter]['ChallengeTitle'] = $not_featured_sites['data'][$counter]['ChallengeTitle']; + $not_featured_sites2[$counter]['ChallengeDesc'] = $not_featured_sites['data'][$counter]['ChallengeDesc']; + $not_featured_sites2[$counter]['EquityPoints'] = $not_featured_sites['data'][$counter]['EquityPoints']; + $not_featured_sites2[$counter]['Slug'] = $not_featured_sites['data'][$counter]['Slug']; + $not_featured_sites2[$counter]['short_desc'] = $not_featured_sites['data'][$counter]['short_desc']; + $not_featured_sites2[$counter]['Photo'] = $not_featured_sites['data'][$counter]['Photo']; + $not_featured_sites2[$counter]['MoreDetails'] = $not_featured_sites['data'][$counter]['MoreDetails']; + $not_featured_sites2[$counter]['Submission_To'] = $not_featured_sites['data'][$counter]['Submission_To']; + $not_featured_sites2[$counter]['remaining_days'] = $not_featured_sites['data'][$counter]['remaining_days']; + $counter++; + } + + + + + + //----------------------------------------------------------------------------- + + + + + $limit_related_sites = 10; + $categoryid_related_sites = 0; + if($category == ""){ + $categoryid_related_sites = 1; + }else{ + $categoryid_related_sites = $category; + } + $url_related_sites = $api_url.'getRelatedChallenges?domainid='.$domainid.'&key='.$key.'&count='.$limit_related_sites.'&categoryid='.$categoryid_related_sites; + + $result_related_sites = createApiCall($url_related_sites, 'GET', $headers, array()); + $related_sites = json_decode($result_related_sites,true); + + if ((isset($related_sites['success'])) && (count($related_sites) > 0)){ + + + $counter = 0; + $limit_related = 4; + + foreach($related_sites['data'] as $k=>$related){ + + $related_sites2[$counter]['name'] = $related['DomainName']; + $related_sites2[$counter]['id'] = $related['DomainId']; + $related_sites2[$counter]['logo'] = $related['Logo']; + $counter++; + } + + + + }else{ + + $related_sites2[0]['name'] = 'codechallenge.com'; + $related_sites2[0]['id'] = ''; + $related_sites2[0]['logo'] = 'http://d2qcctj8epnr7y.cloudfront.net/images/2013/logo-ichallenge1.png'; + + $related_sites2[1]['name'] = 'echallenge.com'; + $related_sites2[1]['id'] = ''; + $related_sites2[1]['logo'] = 'http://contrib.com/uploads/logo/echallenge.png'; + + $related_sites2[2]['name'] = 'filmchallenge.com'; + $related_sites2[2]['id'] = ''; + $related_sites2[2]['logo'] = 'http://d2qcctj8epnr7y.cloudfront.net/images/marvinpogi/logo-filmchallenge.png'; + + $related_sites2[3]['name'] = 'healthchallenge.net'; + $related_sites2[3]['id'] = ''; + $related_sites2[3]['logo'] = 'http://d2qcctj8epnr7y.cloudfront.net/images/2013/logo-HealthChallenge2.png'; + } + + + + $url = $api_url.'getpartners?domain='.$domain.'&key='.$key; + $result = createApiCall($url, 'GET', $headers, array()); + $partners_result = json_decode($result,true); + if (count($partners_result) > 0){ + + $partners = $partners_result; + }else{ + $partners = array(); + } + + $url = $api_url.'getjobsperdomain?domain='.$domain.'&key='.$key; + $result = createApiCall($url, 'GET', $headers, array()); + $jobs_array = json_decode($result,true); + if (count($jobs_array) > 0){ + + $jobs = $jobs_array; + }else{ + $jobs = array(); + } + + //get domain affiliate id + $url = $api_url.'getdomainaffiliateid?domain='.$domain.'&key='.$key; + $result = createApiCall($url, 'GET', $headers, array()); + $data_domain_affiliate = json_decode($result,true); + if ($data_domain_affiliate['success']){ + $domain_affiliate_id = $data_domain_affiliate['affiliate_id']; + }else { + $domain_affiliate_id = '391'; //contrib.com affiliate id + } + $domain_affiliate_link = 'http://referrals.contrib.com/idevaffiliate.php?id='.$domain_affiliate_id.'&url=http://www.contrib.com/signup/firststep?domain='.$domain; + + + $url3 = $api_url.'GetPiwikId?domain='.$domain.'&key='.$key; + $result3 = createApiCall($url3, 'GET', $headers, array()); + $data_domain3 = json_decode($result3,true); + $piwik_id = $data_domain3['data']['idsite']; + + + //get monetize ads from vnoc + $url = $api_url.'getbannercode?d='.$domain.'&p=footer'; + $result = createApiCall($url, 'GET', $headers, array()); + $data_ads = json_decode($result,true); + $footer_banner = html_entity_decode(base64_decode($data_ads['data']['content'])); + + //get related domains + $url = $api_url.'getrelateddomains?domain='.$domain.'&limit=15'; + $result = createApiCall($url, 'GET', $headers, array()); + $data_domains = json_decode($result,true); + if ($data_domains['success']){ + $related_domains = $data_domains['data']; + } + + //get fund campaigns + $url = $api_url.'getfundcampaigns'; + $result = createApiCall($url, 'GET', $headers, array()); + $items = json_decode($result,true); + if ($items['success']){ + $campaigns = $items['data']; + } + + //get micronews + $url = $api_url.'getmicronews?domain='.$domain.'&key='.$key.'&limit=3'; + $result = createApiCall($url, 'GET', $headers, array()); + $news = json_decode($result,true); + if ($news['success']){ + $micronews = $news['data']; + } + + //create file + + $file = str_replace('{{DOMAIN}}',$domain , $file); + $file = str_replace('{{DOMAINID}}',$domainid , $file); + $file = str_replace('{{MEMBER_ID}}',$memberid, $file); + $file = str_replace('{{TITLE}}',$title, $file); + $file = str_replace('{{LOGO}}',$logo, $file); + $file = str_replace('{{DESCRIPTION}}',strip_tags($description), $file); + $file = str_replace('{{ACCOUNT_GA}}',$account_ga, $file); + $file = str_replace('{{PIWIK_ID}}',$piwik_id, $file); + // $file = str_replace('{{SOCIAL_LOGIN}}',$allow_social_login,$file); + $file = str_replace('{{COLOR}}',$color,$file); + $file = str_replace('{{INTRO_TITLE}}',strip_tags($intro_title),$file); + $file = str_replace('{{SMALL_DESCRIPTION}}',strip_tags($intro_description),$file); + $file = str_replace('{{CATEGORYID}}',$category,$file); + $file = str_replace('{{BACKGROUND_URL}}',$background_url,$file); + $file = str_replace('{{FOOTER_BANNER}}',$footer_banner, $file); + // $file = str_replace('{{HEADER_SCRIPT}}',$header_script,$file); + // $file = str_replace('{{CUSTOM_HTML}}',$custom_html,$file); + // $file = str_replace('{{DESC_GRAPHIC}}',$descriptive_graphics_url,$file); + $file = str_replace('{{FEATURED_CHALLENGE}}',strip_tags($featured_challenge),$file); + $file = str_replace('{{AFF_LINK}}',$domain_affiliate_link, $file); + + $file = str_replace('{{FEATUREDC}}',var_export($featured_array, true), $file); + $file = str_replace('{{CDISCUSSIONS}}',var_export($discussion_array, true), $file); + + $file = str_replace('{{NOT_FEATURED_SITES}}',var_export($not_featured_sites2, true), $file); + $file = str_replace('{{RELATED_SITES}}',var_export($related_sites2, true), $file); + $file = str_replace('{{PARTNERS}}',var_export($partners, true), $file); + $file = str_replace('{{JOBS}}',var_export($jobs, true), $file); + $file = str_replace('{{RELATED_DOMAINS}}',var_export($related_domains, true), $file); + $file = str_replace('{{FUND_CAMPAIGNS}}',var_export($campaigns, true), $file); + $file = str_replace('{{MICRONEWS}}',var_export($micronews, true), $file); + $file = str_replace('{{CLINKS}}',var_export($link_array, true), $file); + $file = str_replace('{{CREQUIREMENTS}}',var_export($req_array, true), $file); + $file = str_replace('{{CHALLENGERS}}',var_export($gers_array, true), $file); + + + file_put_contents('config-framework.php', $file); +} + +include "./config-framework.php"; + + + + +if(defined('ENV')) + //$config['base_url'] = 'http://localhost/challengenew/'; + $config['base_url'] = 'http://octoberchallenge.com/'; +else + $config['base_url'] = '/'; + + // Base URL including trailing slash (e.g. http://localhost/) + +$config['default_controller'] = 'home'; // Default controller to load +$config['error_controller'] = 'error'; // Controller used for errors (e.g. 404, 500 etc) + +if(defined('ENV')){ + $config['db_host'] = ''; // Database host (e.g. localhost) + $config['db_name'] = ''; // Database name + $config['db_username'] = ''; // Database username + $config['db_password'] = ''; // Database password +}else { + $config['db_host'] = ''; // Database host (e.g. localhost) + $config['db_name'] = ''; // Database name + $config['db_username'] = ''; // Database username + $config['db_password'] = ''; // Database password +} +?> \ No newline at end of file diff --git a/application/views/details.php b/application/views/details.php new file mode 100644 index 0000000..b188431 --- /dev/null +++ b/application/views/details.php @@ -0,0 +1,104 @@ + + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/application/views/developers.php b/application/views/developers.php new file mode 100644 index 0000000..aacf01e --- /dev/null +++ b/application/views/developers.php @@ -0,0 +1,14 @@ + +
+
+
+

 Are you a Developer?

+
+

 Do you have code or an app that could run this brand? is connected with Contrib.

+

 Contrib is the new way to contribute and get equity building the world's biggest brands and startups. We have our own Developers platform, and we run the world's best brands on them. Do you have an app, or code that could help run ?

+

Inquire

+
+
+
+
+ \ No newline at end of file diff --git a/application/views/footer.php b/application/views/footer.php new file mode 100644 index 0000000..4fdc702 --- /dev/null +++ b/application/views/footer.php @@ -0,0 +1,78 @@ + +
+
+ +
+
+ + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/footer_outer.php b/application/views/footer_outer.php new file mode 100644 index 0000000..7b86c2c --- /dev/null +++ b/application/views/footer_outer.php @@ -0,0 +1,89 @@ + + + + + + +
+
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/application/views/fund.php b/application/views/fund.php new file mode 100644 index 0000000..4c09394 --- /dev/null +++ b/application/views/fund.php @@ -0,0 +1,104 @@ + +
+
+
+
+

Fund Our Ventures

+
+
    + 0):?> + + +
  • +
    Staff Pick
    + + +

    +
    +
    +
    +
    +

    Funded

    +

    +
    +
    +
    +
    +
    +
    +

    Funded

    +

    10%

    +
    +
    +
    +
    +
    +
  • + + + +
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/application/views/header.php b/application/views/header.php new file mode 100644 index 0000000..bf445ab --- /dev/null +++ b/application/views/header.php @@ -0,0 +1,67 @@ + + + + + + + +<?=$info['title']?> - <?=$metatitle?> + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + \ No newline at end of file diff --git a/application/views/header_index.php b/application/views/header_index.php index cb047d3..02fc87f 100644 --- a/application/views/header_index.php +++ b/application/views/header_index.php @@ -9,7 +9,7 @@ "> - + @@ -20,6 +20,8 @@ + + - + @@ -78,7 +80,7 @@ - <?=ucwords($info['domain'])?> + <?=ucwords($info['domain'])?> @@ -89,14 +91,27 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/application/views/howtosponsor.php b/application/views/howtosponsor.php index 733fbc1..860ce71 100644 --- a/application/views/howtosponsor.php +++ b/application/views/howtosponsor.php @@ -117,9 +117,15 @@

Sponsors

+
+ diff --git a/application/views/index.php b/application/views/index.php index dc497d7..42e497a 100644 --- a/application/views/index.php +++ b/application/views/index.php @@ -2,6 +2,8 @@ @@ -56,11 +66,22 @@ function(){ }); }); - +
+
+
+ + + + + +
+
@@ -76,5 +97,10 @@ function(){ +
+
+ +
+
\ No newline at end of file diff --git a/application/views/index2.php b/application/views/index2.php new file mode 100644 index 0000000..772c3c2 --- /dev/null +++ b/application/views/index2.php @@ -0,0 +1,91 @@ + + + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ + \ No newline at end of file diff --git a/application/views/index_details_content.php b/application/views/index_details_content.php new file mode 100644 index 0000000..ad1b044 --- /dev/null +++ b/application/views/index_details_content.php @@ -0,0 +1,71 @@ + + + + + + + + +
+
+ +
+
+
+
+
+
+
Featured Challenge
+
+
+
+
+ <?=stripslashes($getfeaturedchallenge['ChallengeTitle'])?> +
+
+
+
+

+ + + +

+
+ $limit2){ + //$feat_chall2 = substr($feat_chall2, 0, strrpos(substr($feat_chall2, 0, $limit),' ')).'...'; + //} + + echo stripslashes($feat_chall2); + + ?> +
+
+
+
+ 50% Complete +
+
+
    +
  • + + Days Left +
  • +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/application/views/index_featured_challenges.php b/application/views/index_featured_challenges.php index 42df4ef..c998aa1 100644 --- a/application/views/index_featured_challenges.php +++ b/application/views/index_featured_challenges.php @@ -26,7 +26,7 @@
  • - +
    diff --git a/application/views/index_featured_details.php b/application/views/index_featured_details.php new file mode 100644 index 0000000..8555527 --- /dev/null +++ b/application/views/index_featured_details.php @@ -0,0 +1,862 @@ + + + +
    +
    +
    +
    +

    + about this challenge +

    +

    + +

    +
    +
    +
    +

    + +

    + + + +

    + participants +

    +
    +
    +
    +
    +

    + +

    + + + +

    + equity points +

    +
    +
    +
    +
    +

    + 25000 +

    + + + +

    + brands +

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Challenge Details

    +

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    More Details

    +

    +
    +
    + +
    +
    +
    +
    + 0):?> +
    +
    +
    +
    + +
    +
    +

    Daily Challenge Requirements

    + 0):?> + +
      + $r):?> + +
    • + Day - +
    • + + + + +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +

    Prizes

    +

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Timeline

    +
      +
    • +
      + + Submission in Schedule + +
      +

      + Start: +

      +

      + End: +

      +
    • +
    • +
      + + Judging + +
      +

      + From: +

      +

      + To: +

      +
    • +
    • +
      + + Announcement of Winners + +
      +

      + +

      +
    • +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Criteria for Judging

    +

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    How to Enter

    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 0):?> +
    +
    +

    Resource Links

    +
    + +
    + $l):?> + + + + + +
    +
    + + +
    +
    + Official Challenge Hashtag +
    +

    + +

    +
    + +
    +
    + + +
    +
    + +
    + + + + +
    + +
    + + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + 0){ + foreach($getfeaturedchallenge['Requirements'] as $requirement){ + if($x==1){ + echo "

    Challenge Daily Requirements

    "; + } + echo "

    Day $x

    "; + if(!empty($requirement['quiz'])){ + foreach($requirement['quiz'] as $quiz){ + ?> + +
    +
    +
    +
    + +
    +
    +

    + +

    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +

    + +

    +
    +
    + +
    +
    +
    +
    +
    + + +

    +
    +
    +
    +
    + + + + +
    +
    +
    +

    We will never rent, sell or share your email to a third party.

    +
    +
    +
    + +
    + + +
    + + + +
    +
    + + 0):?> + $v):?> +
    +
    +

    +
    + + + + + <?php echo $v['Username']?> + +

    +

    +
    +

    +
    +
    +
    + + +
    + No discussions found in this challenge. +
    + + + +
    +
    +
    +
    +

    Sponsors

    +
    + +
    +
    +
    +

    How to Sponsor this Challenge

    +

    Learn how to sponsor and advertise your product or brand on our viral challenges.

    + +
    +
    +
    +
    +
    Why sponsor challenges on Contrib.com
    + +

    Sponsor a challenge or a set of challenges! In return you will get traffic, advertising, company and/or brand partnership with Global Ventures.

    +
    +
    +
    Lets get you setup
    +

    Head on to Sponsor Registration so you can start browsing and sponsoring the challenges you feel are in sync with your goals.

    +
    +
    +
    Easy Sponsorship
    +

    Click the sponsor link and our admin will contact you personally to setup your sponsorship incentives.

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/application/views/index_featured_sites.php b/application/views/index_featured_sites.php index 234065a..6cbbb1b 100644 --- a/application/views/index_featured_sites.php +++ b/application/views/index_featured_sites.php @@ -32,6 +32,7 @@
    --> +


    @@ -41,4 +42,11 @@
    -
    \ No newline at end of file + +
    + + \ No newline at end of file diff --git a/application/views/index_footer.php b/application/views/index_footer.php index c1d4bc1..8ad356d 100644 --- a/application/views/index_footer.php +++ b/application/views/index_footer.php @@ -1,57 +1,397 @@ -