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


PHP F3::call方法代码示例

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


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

示例1:

<?php

F3::call(':ldap_login');
$cn = "*";
$data = myldap_search("cn={$cn}");
echo "<b>cn={$cn} icin arama sonuclari ...</b> <br />";
for ($i = 0; $i < $data["count"]; $i++) {
    $cn = $data[$i]["cn"];
    $sn = $data[$i]["sn"];
    $telephonenumber = $data[$i]["telephonenumber"];
    $postalcode = $data[$i]["postalcode"];
    $userpassword = $data[$i]["userpassword"];
    echo "CN = {$cn}, SN = {$sn}, TelephoneNumber = {$telephonenumber}, PostalCode = {$postalcode}, PASS = {$userpassword}";
    echo "<br />";
}
//ldap_close(F3::get('LDAP.conn'));
?>

开发者ID:seyyah,项目名称:f3ldap,代码行数:17,代码来源:ldap_search.php

示例2: function

    if ($hata = denetle($value, array('dolu' => array(true, "{$ne} boş bırakılamaz"), 'esit' => array(11, "{$ne} 11 haneli olmalıdır"), 'tamsayi' => array(true, "{$ne} sadece rakam içermeli"), 'ozel' => array(function ($value) {
        return !is_tc($value);
    }, "Geçerli bir {$ne} değil")))) {
        F3::set('error', $hata);
        return;
    }
});
F3::input($alan = 'kizliksoyad', function ($value) use($alan) {
    $ne = "Kızlık Soyadı";
    if ($hata = denetle($value, array('dolu' => array(true, "{$ne} boş bırakılamaz")))) {
        F3::set('error', $hata);
        return;
    }
});
if (!F3::exists('error')) {
    $tc = F3::get('REQUEST.tc');
    $kizliksoyad = F3::get('REQUEST.kizliksoyad');
    $kul = new Axon('kul');
    $kul->load("tc={$tc}");
    if (!$kul->dry() && streq_turkish($kul->kizliksoyad, $kizliksoyad)) {
        // tc no'yu oturuma gömelim ve oradan alalım
        F3::set('SESSION.sorgutc', $tc);
        F3::set('SESSION.sorgukizliksoyad', $kizliksoyad);
        return F3::call(':sorguok');
    }
    F3::set('error', "Girdiğiniz bilgilere uygun bir kayıt bulunamadı.  Lütfen verdiğiniz bilgileri kontrol edin.");
}
// hata var, dön başa ve tekrar sorgu al.
// error alanı dolu ve layout.htm'de görüntülenecek
F3::call(':sorgual');
开发者ID:seyyah,项目名称:uzkay,代码行数:30,代码来源:sorguyap.php

示例3: Axon

<?php

// Retrieve blog entries
$kul = new Axon('kul');
F3::set('entries', $kul->find());
// Use the home.htm template
F3::set('pagetitle', 'ana sayfa');
F3::set('template', 'home');
F3::call('render');
开发者ID:seyyah,项目名称:f3kulmysql,代码行数:9,代码来源:showkul.php

示例4:

<?php

F3::call(":ldap_search");
$cn = "mahmut";
$cn_new = "murat";
echo "<hr /><b>cn = {$cn} kullanicisi \"{$cn_new}\" ile rename ediliyor ...</b><br />";
$r = @ldap_rename(F3::get('LDAP.conn'), "cn={$cn}," . F3::get('LDAP.ou'), "cn={$cn_new}", NULL, TRUE);
echo $r ? "Basarili" : "UYARI: boyle bir kayit bulunamadi";
echo "<hr />Dizinlerin guncel hali...<br />";
F3::call(":ldap_search");
ldap_close(F3::get('LDAP.conn'));
开发者ID:seyyah,项目名称:f3ldap,代码行数:11,代码来源:ldap_rename.php

示例5: Axon

<?php

// Reset previous error message, if any
F3::clear('message');
// Form field validation
F3::call(':common');
if (!F3::exists('message')) {
    // No input errors; add record to database
    $blog = new Axon('kul');
    $blog->copyFrom('REQUEST');
    $blog->save();
    // Return to home page; new blog entry should now be there
    F3::reroute('/');
    /*$payload = json_encode(array(F3::get('REQUEST.title'), F3::get('REQUEST.entry')));
    	F3::reroute('http://192.168.140.86/receiver.php?payload=' . $payload );*/
}
// Display the blog form again
F3::call(':createkul');
开发者ID:seyyah,项目名称:f3kayOLD,代码行数:18,代码来源:savekul.php

示例6: f34data

<?php

// Reset previous error message, if any
F3::clear('message');
// Form field validation
F3::call(':common');
if (!F3::exists('message')) {
    F3::call(':ldap_login');
    $data = F3::get('REQUEST');
    $cn = $data["cn"];
    $data = f34data($data);
    $r = @ldap_modify(F3::get('LDAP.conn'), "cn={$cn}," . F3::get('LDAP.ou'), $data);
    F3::reroute('/');
}
// Display the blog form again
F3::call(':editkul');
开发者ID:seyyah,项目名称:f3ldap,代码行数:16,代码来源:updatekul.php

示例7: DB

<?php

require __DIR__ . '/lib/base.php';
#F3::set('CACHE',TRUE);
F3::set('DEBUG', 1);
F3::set('UI', 'ui/');
F3::set('IMPORTS', 'imports/');
F3::set('FACEBOOK.client_id', '***REMOVED***');
F3::set('FACEBOOK.client_secret', '***REMOVED***');
F3::set('FACEBOOK.redirect_uri', 'http://singleyet.com/login/');
F3::set('FACEBOOK.session_key', F3::resolve('fb_{{@FACEBOOK.client_id}}_access_token'));
F3::set('DB', new DB('mysql:host=localhost;port=3306;dbname=singleyet', 'singleyet', '***REMOVED***'));
F3::call('facebook/facebook.php');
F3::set('Facebook', new Facebook(array('appId' => F3::get('FACEBOOK.client_id'), 'secret' => F3::get('FACEBOOK.client_secret'))));
/////////////////////////////////////////////////
// Status Codes                                //
/////////////////////////////////////////////////
# 1 = Single
# 2 = In a relationship
# 3 = Engaged
# 4 = Married
# 5 = It's complicated
# 6 = In an open relationship
# 7 = Widowed
# 8 = Separated
# 9 = Divorced
# 10 = In a civil union
# 11 = In a domestic relationship
# 12 = Not set
/////////////////////////////////////////////////
# Single = 1, 5, 6, 7, 8, 9, 12                //
开发者ID:nicholasserra,项目名称:singleyet,代码行数:31,代码来源:index.php

示例8: cn

<?php

// Execute validation rules
F3::call('cn|sn|telephonenumber|postalcode|userpassword');
/**
	Functions below are used by both saveblog.php and updateblog.php import
	files for validation of form fields in the blog entry page
**/
function cn()
{
    // Validate cn
    F3::input('cn', function ($value) {
        if (!F3::exists('message')) {
            if (empty($value)) {
                F3::set('message', 'Ad should not be blank');
            } elseif (strlen($value) > 127) {
                F3::set('message', 'Ad is too long');
            } elseif (strlen($value) < 3) {
                F3::set('message', 'Ad is too short');
            }
        }
        // Do post-processing of cn here
        F3::set('REQUEST.cn', ucfirst($value));
    });
}
function sn()
{
    // Validate sn
    F3::input('sn', function ($value) {
        if (!F3::exists('message')) {
            if (empty($value)) {
开发者ID:seyyah,项目名称:f3ldap,代码行数:31,代码来源:common.php

示例9: tc

<?php

// Execute validation rules
F3::call('tc|ad|soyad');
/**
	Functions below are used by both saveblog.php and updateblog.php import
	files for validation of form fields in the blog entry page
**/
function tc()
{
    // Validate tc
    F3::input('tc', function ($value) {
        if (!F3::exists('message')) {
            if (empty($value)) {
                F3::set('message', 'TC should not be blank');
            } elseif (strlen($value) > 127) {
                F3::set('message', 'TC is too long');
            } elseif (strlen($value) < 3) {
                F3::set('message', 'TC is too short');
            }
        }
        // Do post-processing of tc here
        F3::set('REQUEST.tc', ucfirst($value));
    });
}
function ad()
{
    // Validate blog ad
    F3::input('ad', function ($value) {
        if (!F3::exists('message')) {
            if (empty($value)) {
开发者ID:seyyah,项目名称:f3kayOLD,代码行数:31,代码来源:common.php

示例10: checkID

F3::clear('message');
// Form field validation
F3::call('checkID|password|captcha');
if (!F3::exists('message')) {
    // No input error; check values
    if (preg_match('/^admin$/i', F3::get('REQUEST.userID')) && preg_match('/^admin$/i', F3::get('REQUEST.password'))) {
        // User ID is admin, password is admin - set session variable
        F3::set('SESSION.user', '{@REQUEST.userID}');
        // Return to home page; but now user is logged in
        F3::reroute('/');
    } else {
        F3::set('message', 'Invalid user ID or password');
    }
}
// Display the login page again
F3::call(':login');
/**
	Functions below are used by this sandboxed import file for validation
	of form fields in the login page
**/
function checkID()
{
    // Validate user ID
    F3::input('userID', function ($value) {
        if (!F3::exists('message')) {
            if (empty($value)) {
                F3::set('message', 'User ID should not be blank');
            } elseif (strlen($value) > 24) {
                F3::set('message', 'User ID is too long');
            } elseif (strlen($value) < 3) {
                F3::set('message', 'User ID is too short');
开发者ID:seyyah,项目名称:f3kayOLD,代码行数:31,代码来源:auth.php

示例11: array

require_once 'lib/F3.php';
F3::set('RELEASE', FALSE);
// Use custom 404 page
F3::set('E404', 'layout.htm');
// Path to our Fat-Free import files
F3::set('IMPORTS', 'inc/');
// Path to our CAPTCHA font file
F3::set('FONTS', 'fonts/');
// Path to our templates
F3::set('GUI', 'gui/');
// Another way of assigning values to framework variables
F3::set('site', 'Kullanıcı Veritabanı');
// Common inline Javascript
F3::set('extlink', 'window.open(this.href); return false;');
F3::set('DB', array('dsn' => 'mysql:host=localhost;port=3306;dbname=f3', 'user' => 'f3', 'password' => 'secret'));
F3::call(':db');
// Define our main menu; this appears in all our pages
F3::set('menu', array_merge(array('Ana sayfa' => '/'), F3::get('SESSION.user') ? array('Kaydı Güncelle' => '/update', 'Hakkında' => '/about', 'Çıkış' => '/logout') : array('Yeni Kayıt' => '/new', 'Kaydı Güncelle' => '/login')));
F3::route('GET /', ':home');
// Minify CSS; and cache page for 60 minutes
F3::route('GET /min', ':minified', 3600);
F3::route('GET /about', ':about', 3600);
// This is where we display the login page
F3::route('GET /login', ':login', 3600);
// This route is called when user submits login credentials
F3::route('POST /login', ':auth');
// New blog entry
F3::route('GET /new', ':createkul');
// Submission of blog entry
F3::route('POST /new', ':savekul');
F3::route('GET /show', ':showkul');
开发者ID:seyyah,项目名称:f3samulas,代码行数:31,代码来源:index.php

示例12: Axon

    $kul = new Axon('kul');
    $kul->copyFrom('REQUEST');
    $kul->tarih = date("d-m-Y H:i");
    // artık elimizde temiz bir tc no var, resmi kaydedelim
    // ilk kurulum sırasında bu <uploaddir> dizinini oluştur
    // php prosesi yazacağına göre izinleri doğru ayarla
    // 	chgrp -R www-data <uploaddir> && chmod g+w <uploaddir>
    $tc = $kul->tc;
    F3::set('tc', $tc);
    if (!empty($tc)) {
        $resim = F3::get('uploaddir') . $kul->tc . '.jpg';
        yukle($resim);
    }
    if (!F3::exists('error')) {
        // here we go!
        $kul->save();
        // TODO: burada bir özet verelim
        F3::set('message', 'Kaydınız başarıyla yapıldı.');
        // tc no'yu oturuma gömelim ve oradan alalım
        F3::set('SESSION.tc', $tc);
        return F3::call(':ok');
    } else {
        if (file_exists($yeni) && !unlink($yeni)) {
            // TODO ne yazayım ben şimdi buraya
        }
    }
}
// hata var, dön başa ve tekrar kayıt al.
// error alanı dolu ve layout.htm'de görüntülenecek
F3::call(':goster');
开发者ID:seyyah,项目名称:uzkay,代码行数:30,代码来源:kaydet.php


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