當前位置: 首頁>>代碼示例>>PHP>>正文


PHP company::get_companies方法代碼示例

本文整理匯總了PHP中company::get_companies方法的典型用法代碼示例。如果您正苦於以下問題:PHP company::get_companies方法的具體用法?PHP company::get_companies怎麽用?PHP company::get_companies使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在company的用法示例。


在下文中一共展示了company::get_companies方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: isset

<form class="form-horizontal" action="" method="post">
	<div class="col-sm-6">
		  <div class="form-group">
		    <label for="branch_code" class="col-sm-3 control-label">ID</label>
		    <div class="col-sm-8">
		      <input type="text" class="form-control" name="branch_code" id="branch_code" value="<?php 
    echo isset($ID) ? $branch_result->branch_code : '';
    ?>
" placeholder="Id" >
		    </div>
		  </div>

		<?php 
    if (isset($_SESSION['company_id'])) {
        $company_details = $company->get_companies($_SESSION['company_id']);
        $company_name = $company_details->company_name;
        $company_id = $company_details->company_id;
    } else {
        echo $company_name = "";
    }
    ?>

		<div class="form-group">
		    <label for="branch_company_name" class="col-sm-3 control-label">Company</label>
		    <div class="col-sm-8">
		      <input type="text" class="form-control" name="branch_company_name" id="branch_company_name" value="<?php 
    echo $company_name;
    ?>
" placeholder="Company name" readonly>
		    </div>
開發者ID:qundeel,項目名稱:Restaurant-app,代碼行數:30,代碼來源:add_branch.php

示例2: isset

        if (isset($ID)) {
            $results = $company->update_company($_POST, $ID);
        } else {
            // Insert new
            $results = $company->insert_company($_POST);
        }
        if ($results) {
            echo '<div class="alert alert-success" role="alert">';
            echo isset($_GET['id']) ? 'Updated ' : 'Added ';
            echo 'company Sucessfully </div>';
        } else {
            echo '<div class="alert alert-danger" role="alert"> Error </div>';
        }
    }
    if (isset($ID)) {
        $company_result = $company->get_companies($ID);
    }
    ?>

<form class="form-horizontal" action="" method="post">
	<div class="col-sm-6">


		  <div class="form-group">
		    <label for="company_name" class="col-sm-4 control-label">Name</label>
		    <div class="col-sm-8">
		      <input type="text" class="form-control" name="company_name" id="company_name" value="<?php 
    echo isset($ID) ? $company_result->company_name : '';
    ?>
" placeholder="Name" required>
		    </div>
開發者ID:qundeel,項目名稱:Restaurant-app,代碼行數:31,代碼來源:add_company.php

示例3: company

if (!isset($_SESSION['company_id'])) {
    ?>
	
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a class="active" href="#">Companies</a></li>
	</ul>

<div class="page-heading">
	<h1>View Companies</h1>
</div>

	<div class="table-responsive custom-table">
		<?php 
    $company = new company();
    $results = $company->get_companies();
    if ($results) {
    }
    ?>
		<table id="myTable">  
	        <thead>  
	          <tr>  
	           
	            <th>Name</th>  
	             <th>Location</th>  
	            <th>Details</th>  
	            <th>Total Branches</th>  
	            <th></th>  
	          </tr>  
	        </thead>  
	        <tbody>  
開發者ID:qundeel,項目名稱:Restaurant-app,代碼行數:31,代碼來源:view_company.php


注:本文中的company::get_companies方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。