Exemplo n.º 1
0
 public function contribution($id = "")
 {
     $data = array();
     $sql = "select `contributions`.* from `contributions` where `contributions`.`id`='" . mysql_real_escape_string($id) . "' and `contributions`.`table`='investment_orgs' ";
     $q = $this->db->query($sql);
     $contribution = $q->result_array();
     $contribution = $contribution[0];
     if ($contribution['id']) {
         $investment_org = json_decode($contribution['json_data']);
         $investment_org = objectToArray($investment_org);
         $sql = "select * from `web_users` where `id`=" . $this->db->escape($contribution['web_user_id']);
         $q = $this->db->query($sql);
         $web_user = $q->result_array();
         $web_user = $web_user[0];
         $web_user = getWebUser($web_user);
         $data['web_user'] = $web_user;
     }
     if ($web_user) {
         $data['contribution'] = $contribution;
         $sql = "select * from `categories`";
         $q = $this->db->query($sql);
         $categories = $q->result_array();
         $data['categories'] = $categories;
         $sql = "select * from `countries`";
         $q = $this->db->query($sql);
         $countries = $q->result_array();
         $sql = "select distinct `code`, `currency` from `currencies` where LOWER(`currency`) not like 'uses%'";
         $q = $this->db->query($sql);
         $currencies = $q->result_array();
         $data['currencies'] = $currencies;
         $data['countries'] = $countries;
         $people = array();
         if (is_array($investment_org['p_ids'])) {
             foreach ($investment_org['p_ids'] as $key => $value) {
                 $sql = "select * from `people` where `id`='" . mysql_real_escape_string($value) . "'";
                 $q = $this->db->query($sql);
                 $p = $q->result_array();
                 $p = $p[0];
                 $person = array();
                 $person['investment_org_id'] = $investment_org_id;
                 $person['person_id'] = $value;
                 $person['role'] = $investment_org['p_roles'][$key];
                 $person['start_date'] = $investment_org['p_start_dates'][$key];
                 $person['start_date_ts'] = strtotime($investment_org['p_start_dates'][$key]);
                 $person['end_date'] = $investment_org['p_end_dates'][$key];
                 $person['end_date_ts'] = strtotime($investment_org['p_end_dates'][$key]);
                 $person['name'] = $p['name'];
                 $person['slug'] = $p['slug'];
                 $people[] = $person;
             }
         }
         $data['people'] = $people;
         //remove arrays
         $unsets = array();
         foreach ($investment_org as $key => $value) {
             if (is_array($value)) {
                 $unsets[] = $key;
             }
         }
         foreach ($unsets as $key) {
             unset($investment_org[$key]);
         }
         $data['investment_org'] = $investment_org;
         $data['content'] = $this->load->view('investment_orgs/add', $data, true);
         $this->load->view('layout/main', $data);
     }
 }
Exemplo n.º 2
0
<?php

@session_start();
$myaccount = false;
if (!$user) {
    $user = getWebUser($_SESSION['web_user']);
    $myaccount = true;
}
?>
<table cellpadding="0" cellspacing="0" class="p100">
	<tr>
		<td class="contents2">
			<table cellpadding="0" cellspacing="0" class='p100'>
				<tr>
					<td class='breadcrumbs' colspan="3">
					<a href='<?php 
echo site_url();
?>
'>Home</a> >
					<?php 
echo "<a href='" . site_url() . "account/" . $user['id'] . "'>" . $user['name'] . "</a>";
?>
					> Account
					</td>
				</tr>
				<tr>
					<td class='account_left'>
						<?php 
if (trim($user['img'])) {
    ?>
							<table cellpadding="0" cellspacing="0" class="p100">
Exemplo n.º 3
0
 function account($userid = "")
 {
     $data = array();
     if ($_SERVER['HTTP_HOST'] == 'localhost' && !$_SESSION['web_user']) {
         $_SESSION['web_user'] = unserialize('a:7:{s:2:"id";s:1:"5";s:5:"fb_id";s:15:"100004077843297";s:8:"fb_email";s:21:"*****@*****.**";s:7:"fb_data";s:284:"{"id":"100004077843297","name":"Jerome Lee","first_name":"Jerome","last_name":"Lee","link":"http://www.facebook.com/jerome.lee.98892","username":"******","gender":"male","email":"*****@*****.**","timezone":8,"locale":"en_US","updated_time":"2012-07-11T10:27:49 0000"}";s:10:"fb_friends";s:1316:"{"data":[{"name":"Sasha Fox","id":"100000505245095"},{"name":"Mikee Dela Peña Guarino","id":"100000629589263"},{"name":"Carla Villa","id":"100000851593945"},{"name":"Faye Santos","id":"100002110669999"},{"name":"Romnick Edullantes","id":"100002143982649"},{"name":"Szophisticated Rhoze Genuiztah","id":"100002518556374"},{"name":"Ingrid Mendoza Rivera","id":"100002938532983"},{"name":"Rendell Paulo","id":"100002974236892"},{"name":"Jeany Masangkay","id":"100003194877986"},{"name":"Muniquinn Doll","id":"100003516535179"},{"name":"Shäina Rose Besa IV","id":"100003549304942"},{"name":"Shiela Marie Echavez","id":"100003569125646"},{"name":"Yandii Olid III","id":"100003574885667"},{"name":"Jullian Delrosario","id":"100003588335313"},{"name":"Lyra Farro","id":"100004101694332"},{"name":"Marjorie Orbase","id":"100004191425468"},{"name":"Junaina Gon","id":"100004307443721"},{"name":"Samantha Moh","id":"100004431932704"},{"name":"Ann Sarap","id":"100004483902375"},{"name":"Ganda MaLdita","id":"100004629572460"},{"name":"Mahal Khani Khate","id":"100004682401219"},{"name":"Arnie Samonte","id":"100004688465647"}],"paging":{"next":"https://graph.facebook.com/100004077843297/friends?access_token=AAAB7W3LmGYIBACvqZCfHc5VqzaN0QlzmQ657WBhjDEvgojWZCyUBgnSfVScl6vaTdcaQKOhrAMemv97aVsM2YFQPXU8ypwmqdB3P1q3kvuPVc5RNX8";s:9:"dateadded";s:19:"2012-12-04 14:21:52";s:11:"dateupdated";s:19:"2012-12-06 13:20:50";}');
     }
     if (!$_SESSION['web_user'] && !$_SESSION['user']) {
         header('HTTP/1.1 301 Moved Permanently');
         header("Location: " . site_url());
         exit;
     }
     if (!$userid) {
         $userid = $_SESSION['web_user']['id'];
     }
     if ($userid) {
         $sql = "select * from `web_users` where `id`='" . mysql_real_escape_string($userid) . "'";
         $q = $this->db->query($sql);
         $web_user = $q->result_array();
         $web_user = $web_user[0];
         if ($web_user['id']) {
             $data['user'] = getWebUser($web_user);
         }
     }
     $sql = "select * from `revisions` where `web_user_id`='" . mysql_real_escape_string($web_user['id']) . "' order by `dateupdated_ts` desc limit 20";
     $q = $this->db->query($sql);
     $revisions = $q->result_array();
     $data['revisions'] = $revisions;
     $sql = "select * from `contributions` where `web_user_id`='" . mysql_real_escape_string($web_user['id']) . "' order by `dateupdated_ts` desc limit 20";
     $q = $this->db->query($sql);
     $contributions = $q->result_array();
     $data['contributions'] = $contributions;
     $data['content'] = $this->load->view('startuplist/account', $data, true);
     $this->load->view('startuplist/main', $data);
 }
Exemplo n.º 4
0
										<?php 
echo "<a href='" . site_url() . "investment_org/" . $investment_org['slug'] . "/" . $investment_org['id'] . "'>" . $investment_org['name'] . "</a>";
?>
 Revisions
									</td>
								</tr>
								<tr>
									<td class="description">
										<?php 
if (is_array($revisions)) {
    foreach ($revisions as $key => $revision) {
        $sql = "select * from `web_users` where `id`=" . $this->db->escape($revision['web_user_id']);
        $q = $this->db->query($sql);
        $web_user = $q->result_array();
        $web_user = $web_user[0];
        $web_user = getWebUser($web_user);
        $approved = "";
        if ($revision['approved'] == '1') {
            $approved = "<a style='color:green' class='bold'>APPROVED</a>";
        } else {
            if ($revision['approved'] == '-1') {
                $approved = "<a style='color:red' class='bold'>REJECTED</a>";
            } else {
                $approved = "<a style='color:black' class='bold'>PENDING</a>";
            }
        }
        echo "<div class='revision padb5'>[ " . date("M d, Y H:i:s", $revision['dateupdated_ts']) . " ] Revision submitted by <a href='" . site_url() . "account/" . $web_user['id'] . "'>" . $web_user['name'] . "</a> ... {$approved} </div>";
    }
}
?>
								
Exemplo n.º 5
0
Arquivo: main.php Projeto: juslee/e27
</div>
<div class='list'>
<table>
	<tr>
		<th style="width:20px"></th>
		<th>Login E-mail / Business E-mail</th>
		<th>Name</th>
		<th>Type</th>
		<th>Date Added</th>
		<th></th>
		
	</tr>
	<?php 
$t = count($web_users);
for ($i = 0; $i < $t; $i++) {
    $user = getWebUser($web_users[$i]);
    if (!trim($user['name'])) {
        continue;
    }
    ?>
		<tr id="tr<?php 
    echo htmlentitiesX($user['id']);
    ?>
" class="row" >
			<td><?php 
    echo $start + $i + 1;
    ?>
</td>
			<td>
				<?php 
    if (trim($user['business_email'])) {
Exemplo n.º 6
0
 function sendApproveContrib($contrib_id, $person_id)
 {
     $sql = "select * from `people` where `id`='" . mysql_real_escape_string($person_id) . "'";
     $q = $this->db->query($sql);
     $person = $q->result_array();
     $person = $person[0];
     $sql = "select * from `web_users` where `id` in (select `web_user_id` from `contributions` where `id`='" . mysql_real_escape_string($contrib_id) . "')";
     $q = $this->db->query($sql);
     $web_user = $q->result_array();
     $web_user = $web_user[0];
     $user = getWebUser($web_user);
     $emailtos = array();
     $name = $user['name'];
     $zemail = trim(strtolower($web_user['email']));
     $business_email = trim(strtolower($web_user['business_email']));
     $fb_email = trim(strtolower($web_user['fb_email']));
     $emails = array();
     if ($zemail) {
         if (!in_array($zemail, $emails)) {
             $email = array();
             $email['name'] = $name;
             $email['email'] = $zemail;
             $emailtos[] = $email;
             $emails[] = $zemail;
         }
     }
     if ($business_email) {
         if (!in_array($business_email, $emails)) {
             $email = array();
             $email['name'] = $name;
             $email['email'] = $business_email;
             $emailtos[] = $email;
             $emails[] = $business_email;
         }
     }
     if ($fb_email) {
         if (!in_array($fb_email, $emails)) {
             $email = array();
             $email['name'] = $name;
             $email['email'] = $fb_email;
             $emailtos[] = $email;
             $emails[] = $fb_email;
         }
     }
     if (count($emailtos) && $person['id']) {
         $from = "*****@*****.**";
         $fromname = "27x";
         $subject = "Your Submission is now Online";
         $template = array();
         $template['data'] = array();
         $template['data']['content'] = "Hi {$name},\n\n\t\t\tYour 27x Startup List contribution <b>" . $person['name'] . "</b> is now accessible <a href='http://27x.co/person/" . $person['slug'] . "'>http://27x.co/person/" . $person['slug'] . "</a>\n\n\t\t\tYou can edit it further by:\n\t\t\t\n\t\t\ta) Checking that the general information is complete.\n\t\t\tb) Adding career details.\n\t\t\tc) Adding a profile image of the person.\n\t\t\td) Make sure associated investment organization is updated.\n\t\t\t\n\t\t\t\n\t\t\tYou can also follow any changes made to this person's data by viewing the Revision History\n\t\t\t<a href='http://27x.co/editperson/" . $person['id'] . "/revisions'>http://27x.co/editperson/" . $person['id'] . "/revisions</a>\n\t\t\t\n\t\t\t\n\t\t\tThanks!\n\t\t\t\n\t\t\t- 27x Team\n\t\t\t<a href='http://27x.co'>27x.co</a>\n\t\t\t";
         $template['data']['content'] = nl2br($template['data']['content']);
         //$template['data'] = json_encode($template['data']);
         $template['slug'] = "startuplist-wrap";
         send_email($from, $fromname, $emailtos, $subject, $message, $template);
     }
 }
Exemplo n.º 7
0
 function sendApproveContrib($contrib_id, $company_id)
 {
     $sql = "select * from `companies` where `id`='" . mysql_real_escape_string($company_id) . "'";
     $q = $this->db->query($sql);
     $company = $q->result_array();
     $company = $company[0];
     $sql = "select * from `web_users` where `id` in (select `web_user_id` from `contributions` where `id`='" . mysql_real_escape_string($contrib_id) . "')";
     $q = $this->db->query($sql);
     $web_user = $q->result_array();
     $web_user = $web_user[0];
     $user = getWebUser($web_user);
     $emailtos = array();
     $name = $user['name'];
     $zemail = trim(strtolower($web_user['email']));
     $business_email = trim(strtolower($web_user['business_email']));
     $fb_email = trim(strtolower($web_user['fb_email']));
     $emails = array();
     if ($zemail) {
         if (!in_array($zemail, $emails)) {
             $email = array();
             $email['name'] = $name;
             $email['email'] = $zemail;
             $emailtos[] = $email;
             $emails[] = $zemail;
         }
     }
     if ($business_email) {
         if (!in_array($business_email, $emails)) {
             $email = array();
             $email['name'] = $name;
             $email['email'] = $business_email;
             $emailtos[] = $email;
             $emails[] = $business_email;
         }
     }
     if ($fb_email) {
         if (!in_array($fb_email, $emails)) {
             $email = array();
             $email['name'] = $name;
             $email['email'] = $fb_email;
             $emailtos[] = $email;
             $emails[] = $fb_email;
         }
     }
     if (count($emailtos) && $company['id']) {
         $from = "*****@*****.**";
         $fromname = "27x";
         $subject = "Your Submission is now Online";
         $template = array();
         $template['data'] = array();
         $template['data']['content'] = "Hi {$name},\r\n\r\n\t\t\tYour 27x Startup List contribution <b>" . $company['name'] . "</b> is now accessible <a href='http://27x.co/company/" . $company['slug'] . "'>http://27x.co/company/" . $company['slug'] . "</a>\r\n\r\n\t\t\tYou can edit it further by:\r\n\t\t\t\r\n\t\t\ta) Checking that the general information is complete\r\n\t\t\tb) Adding funding milestones for this company \r\n\t\t\tc) Adding a screenshot of the company's products.\r\n\t\t\td) Make sure the funding data is up-to-date.\r\n\t\t\te) Fill out profiles for the executive team and linking them to the company.\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tYou can also follow any changes made to this company's data by viewing the Revision History\r\n\t\t\t<a href='http://27x.co/editcompany/" . $company['id'] . "/revisions'>http://27x.co/editcompany/" . $company['id'] . "/revisions</a>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tThanks!\r\n\t\t\t\r\n\t\t\t- 27x Team\r\n\t\t\t<a href='http://27x.co'>27x.co</a>\r\n\t\t\t";
         $template['data']['content'] = nl2br($template['data']['content']);
         //$template['data'] = json_encode($template['data']);
         $template['slug'] = "startuplist-wrap";
         send_email($from, $fromname, $emailtos, $subject, $message, $template);
     }
 }