本文整理匯總了PHP中Website::findFirst方法的典型用法代碼示例。如果您正苦於以下問題:PHP Website::findFirst方法的具體用法?PHP Website::findFirst怎麽用?PHP Website::findFirst使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Website
的用法示例。
在下文中一共展示了Website::findFirst方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Website
<?php
if (isset($_GET['action']) && $_GET['action'] == 'sendmail') {
require_once CAKEPHP . DS . 'inflector.php';
require_once KOEZION . DS . 'object.php';
require_once KOEZION . DS . 'model.php';
require_once MODELS . DS . 'website.php';
$message = 'Adresse : ';
$websiteModel = new Website();
$website = $websiteModel->findFirst(array('conditions' => array('online' => 1)));
$urls = explode("\n", $website['url']);
foreach ($urls as $url) {
$message .= trim($url) . ", ";
}
$message = substr($message, 0, strlen($message) - 2) . '.';
$message .= "\n" . 'Penser a demander la description au webmaster pour insertion dans le portfolio';
$to = 'contact@koezion-cms.com';
$subject = '..:: Nouveau Site KoéZion Installé ::..';
$headers = 'From: contact@koezion-cms.com' . "\r\n" . 'Reply-To: contact@koezion-cms.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
$checkSendMail = @mail($to, $subject, $message, $headers);
}
?>
<div id="right">
<div id="main">
<div class="box">
<div class="title">
<h2>FIN DE L'INSTALLATION</h2>
</div>
<div class="content nopadding">
<div class="system succes">
<b>Bravo!!!</b><br />