本文整理汇总了PHP中Company::getCompanyByEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Company::getCompanyByEmail方法的具体用法?PHP Company::getCompanyByEmail怎么用?PHP Company::getCompanyByEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Company
的用法示例。
在下文中一共展示了Company::getCompanyByEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Company
<?php
/**
* Developed by Jay Gaha
* http://jaygaha.com.np
*/
include 'includes/inc.php';
include "includes/classes/class.company.php";
$company = new Company();
$email = $_SESSION['email'];
$checkRow = $company->getCompanyByEmail($email);
if (!$checkRow) {
header('HTTP/1.1 404 Not Found');
exit('404, Invalid ID');
}
$data['formStatus'] = 'edit';
$data['row'] = $checkRow;
/*echo "<pre>";
print_r($data['row']);*/
$data['id'] = $checkRow['id'];
$data['logo'] = checkImagexists('../../uploads/', 'companylogo_' . $checkRow['id']);
$data['pic'] = checkImagexists('../../uploads/', 'companypic_' . $checkRow['id']);
$data['pic1'] = checkImagexists('../../uploads/', 'companypic1_' . $checkRow['id']);
$data['pic2'] = checkImagexists('../../uploads/', 'companypic2_' . $checkRow['id']);
layout('form_company', $data);
示例2: array
if (isset($_REQUEST['submit'])) {
$action = $_REQUEST['submit'];
if ($action == 'submit') {
include 'includes/classes/class.user.php';
include 'includes/classes/class.company.php';
$arr_agents = array();
$arr_email = array();
$user = new User();
$company = new Company();
if (!empty($_POST['email'])) {
$user_info = $user->login_details($_POST['email']);
if ($user_info) {
if ($user_info['user_type'] != 'administrator') {
if (base64_encode($_POST['password']) == $user_info['password']) {
if ($user_info['status'] == '1') {
$companyDetail = $company->getCompanyByEmail($user_info['email']);
$_SESSION['user_id'] = $user_info['id'];
$_SESSION['username'] = $user_info['username'];
$_SESSION['email'] = $user_info['email'];
if ($companyDetail) {
$_SESSION['company_id'] = $companyDetail['id'];
}
header('location: home.php');
exit;
} else {
$error = true;
header('location: index.php?act=deactivate');
exit;
}
} else {
$error = true;
示例3: isset
/* AJAX check */
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
$com_email_check = isset($_GET['company_email']) ? $_GET['company_email'] : null;
$art_email_check = isset($_GET['artist_email']) ? $_GET['artist_email'] : null;
//email check for company
if (!is_null($com_email_check)) {
include "includes/classes/class.company.php";
$company = new Company();
$id = isset($_GET['id']) ? $_GET['id'] : null;
if ($id > 0) {
$data = $company->get_row($id);
$oemail = $data['email'];
if ($oemail == $com_email_check) {
echo "true";
} else {
$is_valid = $company->getCompanyByEmail($com_email_check);
if ($is_valid) {
echo "false";
} else {
echo "true";
}
}
} else {
$is_valid = $company->getCompanyByEmail($com_email_check);
if ($is_valid) {
echo "false";
} else {
echo "true";
}
}
}