当前位置: 首页>>代码示例>>PHP>>正文


PHP Company::getCompanyInfo方法代码示例

本文整理汇总了PHP中Company::getCompanyInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::getCompanyInfo方法的具体用法?PHP Company::getCompanyInfo怎么用?PHP Company::getCompanyInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Company的用法示例。


在下文中一共展示了Company::getCompanyInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: action_index

 public function action_index()
 {
     $studentsPerProject = 5;
     $post = $this->request->post();
     $session = Session::instance();
     //$this->request->query('p')
     //print_r($session);
     $res = '';
     if (isset($post['submit'])) {
         if (Project::addComment($post['projectID'], $post['comment'], $post['clientTime'])) {
             $res = "<div id = 'alertDiv' class='alert alert-success'>Comment was added </div>";
             header("Refresh:2; url=projectDetails?pid=" . $_POST['projectID']);
         } else {
             $res = "<div id = 'alertDiv' class='alert alert-success'>Comment wasn't added </div>";
             header("Refresh:2; url=projectDetails?pid=" . $_POST['projectID']);
         }
         $this->response->body(View::factory('header') . View::factory('projectDetails')->set('res', $res));
     } elseif (isset($_GET['signup'])) {
         //if signing up for project execute this
         if (isset($_SESSION['userId'])) {
             $r = Project::signUpForProject($this->request->query('signup'), $_SESSION['userId']);
             $res = '';
             if ($r) {
                 $res = "<div id = 'alertDiv' class='alert alert-success'>Signed up successfully!";
             } else {
                 $res = "<div id = 'alertDiv' class='alert alert-success'>Signed up failed!";
             }
         } else {
             $res = "<div id = 'alertDiv' class='alert alert-success'>Please sign In</div>";
             //ova ne se gleda bez margini
         }
         $this->response->body(View::factory('header') . View::factory('projectDetails')->set('res', $res));
         header("Refresh:2; url=welcome");
     } else {
         $projectID = $this->request->query('pid');
         $currentProject = Project::getProjectByID($projectID);
         //print_r($currentProject);
         $companyDetails = Company::getCompanyInfo($currentProject['fk_CompanyID']);
         $this->response->body(View::factory('header') . View::factory('projectDetails')->set('currentProject', $currentProject)->set('companyDetails', $companyDetails)->set('projectID', $projectID)->set('studentsPerProject', $studentsPerProject)->set('userType', $session->get('userType'))->set('userId', $session->get('userId'))->set('res', $res));
     }
 }
开发者ID:JovanRis,项目名称:Demola2,代码行数:41,代码来源:ProjectDetails.php

示例2: showPortfolio

 public function showPortfolio($accountnumber)
 {
     $db = connect_db();
     //get all the stocks the user owns
     $result = $db->query('SELECT DISTINCT stock FROM Brokerage_Transactions WHERE accountnumber=' . $accountnumber);
     $portfolio = array();
     foreach ($result as $row) {
         $elements = array();
         $company = new Company();
         //get company info
         $companyinfo = $company->getCompanyInfo($row['stock']);
         $current_price = $companyinfo->quotes->quote->last;
         //echo '<br>'.$current_price;
         array_push($elements, $row['stock'], $current_price, $this->has_enough_shares($accountnumber, $row['stock']), $current_price * $this->has_enough_shares($accountnumber, $row['stock']));
         array_push($portfolio, $elements);
     }
     $db = NULL;
     return $portfolio;
 }
开发者ID:anokbakn,项目名称:MSU_Software_Arch_Design_PP2_ASNV,代码行数:19,代码来源:User.php

示例3: dirname

<?php

require_once dirname(dirname(dirname(__FILE__))) . '/modules/Company.class.php';
$companyId = isset($_GET['companyId']) ? $_GET['companyId'] : 0;
if ($companyId != 0) {
    $companyObj = new Company();
    $companyInfo = $companyObj->getCompanyInfo($companyId, false);
    if (count($companyInfo) > 0) {
        ?>

	<form method="POST" class="form-horizontal" id="addCompanyForm">
	<input type="hidden" id="baseName" name="baseName" value="<?php 
        echo __BASENAME__;
        ?>
" />
	<input type="hidden" id="companyId" name="companyId" value="<?php 
        echo $companyId;
        ?>
" />
	<div class="pull-left"><h4>Edit <?php 
        echo $companyInfo['name'];
        ?>
</h4></div>
	<div class="pull-right"><button class="btn btn-primary b" type="submit">Submit Changes</button> &nbsp; <a href="companies.html" class="btn btn-default">Cancel</a></div>
	<div class="clearfix"></div>

	<div id="status-message"></div>

	<div class="control-group">
		<label for="email" class="control-label">Company Name</label>
		<div class="controls">
开发者ID:erickigotho,项目名称:Paxis,代码行数:31,代码来源:edit_company.php

示例4: Company

        $r = $projectObj->signUpForProject($_GET['signup'], $_SESSION['userID']);
        if ($r) {
            echo "<div style ='margin:50px;'>Signed up successfully!</div>";
        } else {
            echo "<div style ='margin:50px;'>Signup failed!</div>";
        }
    } else {
        echo "<div style ='margin:50px;'>Please sign In</div>";
        //ova ne se gleda bez margini
    }
} else {
    //if not signing up execute this
    $projectID = $_GET['pid'];
    $currentProject = $projectObj->getProjectByID($projectID);
    $companyObj = new Company();
    $companyDetails = $companyObj->getCompanyInfo($currentProject['fk_CompanyID']);
    //print_r ($companyDetails);
    ?>
   
    
    <div id='main'>
    
     <div class="panel panel-success">
       <div class="panel-heading"> <?php 
    echo $currentProject['ProjectName'];
    ?>
 </div>
       <div class="panel-body">
          <?php 
    echo $currentProject['Category'];
    ?>
开发者ID:JovanRis,项目名称:fiktApp,代码行数:31,代码来源:projectDetails.php


注:本文中的Company::getCompanyInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。