blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
d76ed9c76b9a17c5a3e12ef39f0d55f23b20613f | PHP | Stubbs/Graphite-Filler | /src/GraphiteFiller/SocketProxy.inc | UTF-8 | 2,818 | 3.15625 | 3 | [] | no_license | <?php
/**
* proxy class for PHP's socket_* functions, used mainly when the code
* you're writing is going to be unit tested.
*
* @author Stuart Grimshaw <stuart@localphone.com>
* @version $Id$
* @copyright Stuart Grimshaw <stuart@localphone.com>, 10 April, 2012
* @package GraphiteFiller
*/
Namespace GraphiteFi... | true |
fe8064f8fbc3a86f9b4b40d575a8592a85811b6c | PHP | spryker-eco/crefo-pay-api | /src/SprykerEco/Zed/CrefoPayApi/Business/Logger/CrefoPayApiLogger.php | UTF-8 | 6,667 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* MIT License
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace SprykerEco\Zed\CrefoPayApi\Business\Logger;
use Generated\Shared\Transfer\CrefoPayApiRequestTransfer;
use Generated\Shared\Transfer\CrefoPayApiResponseTransfer;
use Generat... | true |
5b04c1858daa46cc8a700b3af63ac5c5d3b4128d | PHP | Taeir/Galgbot | /config.php | UTF-8 | 2,856 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
return [
//=============================================================================================
//Telegram
//=============================================================================================
//Telegram Bot API Key
'api_key' => '',
//Telegram Bot Username
'u... | true |
99c35794b264ee37c32e6924d7f1616a412f71ec | PHP | gneyal/Buller | /controllers/presentStocks.php | UTF-8 | 1,391 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: eyal
* Date: 7/23/12
* Time: 5:16 PM
* To change this template use File | Settings | File Templates.
*/
include_once "/var/www/CodeIgniter_2.1.1/application/CIFormTutorial/models/obj/YahooStock.php";
class PresentStocks extends CI_Controller
{
public $yahooS... | true |
17c090956a358fbf5ef5bed74ecea5f1e2bc9d05 | PHP | JoshuaHeathcote1987/my_website | /application/models/Welcome_model.php | UTF-8 | 1,019 | 2.515625 | 3 | [] | no_license | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Welcome_model extends CI_Model
{
public function Login($email, $password)
{
$query = $this->db->get('users');
foreach ($query->result() as $row)
{
if($row->email === $email && $row->password ==... | true |
141c3c5557a57d2426705e51294388bb1792c89e | PHP | alonexy/logStorageService | /app/Command/Examples/PipeTcpServer.php | UTF-8 | 9,762 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types = 1);
/**
* This file is part of log_store.
*
* @author alonexy@qq.com
*/
namespace App\Command\Examples;
use App\Command\BaseCommand;
use Co\Channel;
use Swoole\Coroutine as Co;
use Swoole\Timer;
class PipeTcpServer extends BaseCommand
{
public $commandName = 'example:pipe_lo... | true |
af6283793535d9961f160b6ecf669c4772b600e3 | PHP | coneasorin/Licenta_Dash | /administrator/components/adauga_pacient_date.php | UTF-8 | 3,007 | 2.53125 | 3 | [] | no_license | <?php
if (isset($_POST['adauga_pacient'])) {
$link = mysqli_connect("localhost", "root", "", "licenta");
if ($link === false) {
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$CNP = mysqli_real_escape_string($link, $_REQUEST['CNP']);
$Parola=md5($CNP);
$Parola =substr($P... | true |
aa65ed24ececa420089b604fdf7ebc03ac5158f8 | PHP | acuervoa/testBio | /tests/PersonTest.php | UTF-8 | 1,920 | 2.96875 | 3 | [] | no_license | <?php
namespace tests;
use Carbon\Carbon;
use Biorrhythms\Person;
use PHPUnit\Framework\TestCase;
/**
* test for Person Calss.
*
* @author Andrés Cuervo Adame (kuerbo@gmail.com)
*/
class PersonTest extends TestCase
{
protected $person;
/**
* Initialise classes to test against.
*
* @author... | true |
6e057dc6990b68b222c3aa36c5ddfbbaa0261ae9 | PHP | orlandoGAero/Dmind2018 | /intranet/configuracion/transacciones/ventas/tipos-pago/classTiposPago.php | UTF-8 | 3,572 | 2.65625 | 3 | [] | no_license | <?php
require'../../../../class/dataBaseConn.php';
class TiposPago
{
public function obtenerTiposPago() {
$Conexion = new dataBaseConn();
$sth = $Conexion -> prepare('SELECT id_tipo_pago,nom_tipo_pago FROM tipos_pago');
$sth -> execute();
$tiposPago = $sth -> fetchAll();
return $tiposPago;
}
p... | true |
bb1ef0c3d07378cb09a8d61d0980a72c5767224e | PHP | Serswii/yii2-project | /models/Task.php | UTF-8 | 5,799 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "task".
*
* @property int $id_task
* @property string $title
* @property string $description
* @property int $lvl
* @property string $language
* @property string $filetask
* @property int $time
* @property int $automat_ruch
* @pr... | true |
16fce7abaed9307db4425158147688dc066c9e5d | PHP | misusonu18/Livewire-Register-Login-CRUD | /app/Http/Livewire/Login.php | UTF-8 | 875 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Livewire;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
class Login extends Component
{
public $email;
public $password;
public $users;
protected $rules = [
'email' => 'required|email',
'password' => 'required',
];
... | true |
4722c7457c9370c8e1bc24744c68a322805413bb | PHP | Jen304/Snacky | /product_details.php | UTF-8 | 1,720 | 2.65625 | 3 | [] | no_license | <?php
include ('includes/header.php');
include('includes/db_connection.php');
include('includes/nav_bar.php');
?>
<title>Add to Cart | Snacky</title>
<link rel="stylesheet" href="css/product_details.css">
</head>
<body>
<?php
$prod_id = $_POST['pid'];
//query
$prodq="SELECT p.product_id, p.produc... | true |
31a712df955dc7f01376bb4a4571d294c4dc22ed | PHP | wolif/validate.php | /src/Components/Type/Array_.php | UTF-8 | 3,106 | 2.765625 | 3 | [] | no_license | <?php
namespace Wolif\Validate\Components\Type;
use Wolif\Validate\Components\Component;
use Wolif\Validate\Result;
class Array_ extends Component
{
public function confirm($field, $input, ...$params)
{
if (!is_array($input[$field])) {
return Result::failed("param [{$field}] must be an ar... | true |
b70d17e049cc74dc0b8aadf3f18656abe63875d1 | PHP | viccherubini/artisan-system | /Cache.php | UTF-8 | 1,206 | 2.96875 | 3 | [] | no_license | <?php
class Artisan_Cache {
private $defaultTtl = 0;
private $ttlOverride = array();
private $started = false;
public function __construct($defaultTtl = 0) {
$this->defaultTtl = abs($defaultTtl);
if ( false === extension_loaded('apc') ) {
throw new Artisan_Exception('The APC extension is not loaded and ... | true |
300062f345f2f017dd0152901599801db1421634 | PHP | krissss/YunDou-advanced | /backend/models/forms/LoginForm.php | UTF-8 | 1,431 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models\forms;
use Yii;
use common\models\Users;
use yii\base\Model;
use common\functions\CommonFunctions;
class LoginForm extends Model{
public $username;
public $password;
public $verifyCode;
private $_user = false;
public function rules(){
return [
... | true |
1f5dff148cc88f6cb5e792871402a816ef728d24 | PHP | spooner77/dream-cms | /module/Page/src/Page/View/Helper/PageTree.php | UTF-8 | 3,604 | 2.71875 | 3 | [] | no_license | <?php
namespace Page\View\Helper;
use Zend\View\Helper\AbstractHelper;
class PageTree extends AbstractHelper
{
/**
* Pages
* @var array
*/
protected $pages = [];
/**
* Tree
* @var string
*/
protected $tree = null;
/**
* Active page id
* @var integer
*... | true |
ff36464f1015697b6e5b76cb5ed1b53a52fff99d | PHP | andparsons/mage-app-start | /app/code/Magento/Tax/Model/TaxDetails/AppliedTaxRate.php | UTF-8 | 2,040 | 2.671875 | 3 | [] | no_license | <?php
namespace Magento\Tax\Model\TaxDetails;
use Magento\Framework\Model\AbstractExtensibleModel;
use Magento\Tax\Api\Data\AppliedTaxRateInterface;
/**
* @codeCoverageIgnore
*/
class AppliedTaxRate extends AbstractExtensibleModel implements AppliedTaxRateInterface
{
/**#@+
* Constants defined for keys of ... | true |
6b20dd21f216a773441df0c286fa574e9d7e51d5 | PHP | matsbeddinge/kronos | /src/CMComment/CMComment - Kopia.php | UTF-8 | 6,573 | 2.953125 | 3 | [] | no_license | <?php
/**
* A model for comments stored in database.
*
* @package KronosCore
*/
class CMComment extends CObject implements IHasSQL, ArrayAccess, IModule {
/**
* Properties
*/
public $dataComment;
/**
* Constructor
*/
public function __construct($id=null) {
parent::__construct();
if($id) {... | true |
5de25a8272c3fbd784eb1ea424ddeaf710c019d2 | PHP | wael-ali/mvc_php | /app/Core/View.php | UTF-8 | 1,083 | 2.828125 | 3 | [] | no_license | <?php
namespace app\Core;
class View
{
protected $templateName ;
protected $templateData ;
public function __construct()
{
$this->templateName = 'errors/somethingWentWrong.phtml';
}
public function render($templateName, $templateData = [])
{
$ok = true;
$errorM... | true |
d2583b6482f68d16c1800ec6064349f55f764783 | PHP | rekk88/php-snacks-b1 | /snack2.php | UTF-8 | 1,180 | 3.203125 | 3 | [] | no_license | <!-- Passare come parametri GET name, mail e age e verificare (cercando i metodi che non conosciamo nella documentazione) che name sia più lungo di 3 caratteri,
che mail contenga un punto e una chiocciola e che age sia un numero. Se tutto è ok stampare “Accesso riuscito”, altrimenti “Accesso negato” -->
<?php
$name ... | true |
56c4f0ee4c4b3890381b1ea2fa490b9ef73d480c | PHP | lucatume/wp-browser | /src/Codeception/Lib/Generator/AbstractGenerator.php | UTF-8 | 2,110 | 3.390625 | 3 | [
"MIT"
] | permissive | <?php
namespace Codeception\Lib\Generator;
use Codeception\Util\Template;
abstract class AbstractGenerator
{
/**
* @var array<string>J
*/
public static $requiredSettings = [];
/**
* @var string
*/
protected $template = '';
/**
* @var array<string,mixed>
*/
prot... | true |
85c2a068151849f680d0a76bee089b75d56b63d1 | PHP | somefool/habari-extras | /plugins/termmenus/trunk/termmenus.plugin.php | UTF-8 | 24,539 | 2.671875 | 3 | [] | no_license | <?php
/**
* TermMenus
*
* @todo add domain to all _t() calls
* @todo style everything so it looks good
*/
class TermMenus extends Plugin
{
// define values to be stored as $object_id in Terms of type 'menu'
private $item_types = array(
'url' => 0,
'spacer' => 1, // a spacer is an item that goes nowhere.
);
... | true |
e142f0ab9eeb675d1839c12da8d22c28a8a9c58d | PHP | emcode/git-access-layer | /example/scenario-01.php | UTF-8 | 1,496 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/helper-functions.php';
use Simplercode\GAL\Command\InitCommand;
use Simplercode\GAL\Command\CommitCommand;
use Simplercode\GAL\Command\LogCommand;
use Simplercode\GAL\Command\Log\Collector\DefaultLogCollector;
use Simplercode\GAL\Processor;
use Si... | true |
9b2a512f6b533990ec4426db3d71adce5b4ed917 | PHP | sidmalde/AdyaAyurveda | /app/Model/Product.php | UTF-8 | 721 | 2.609375 | 3 | [] | no_license | <?php
class Product extends AppModel {
var $name = 'Product';
var $order = 'Product.created';
var $actsAs = array('Containable');
var $displayField = 'name';
var $hasMany = array(
'Order'
);
function findList() {
$this->contain();
$options = array(
'order' => array(
'name' => 'ASC',
),
);
... | true |
2db1d55a29fb3dda0815d20e6006950efea226e6 | PHP | Cuacha07/cms | /src/Controllers/UserController.php | UTF-8 | 5,453 | 2.53125 | 3 | [] | no_license | <?php
namespace Nhitrort90\CMS\Controllers;
use Carbon\Carbon;
use Nhitrort90\CMS\Modules\Users\UsersRepo;
use Nhitrort90\CMS\Requests\CreateUserRequest;
use Nhitrort90\CMS\Requests\UpdatePassRequest;
use Nhitrort90\CMS\Requests\UpdateUserRequest;
use Illuminate\Contracts\Auth\Guard;
use Auth;
use App\Http\Requests;
... | true |
bb93d9c0ab5cfa4eee018e84b66941c6938a8b9a | PHP | Chamalie-UOM/RiseKite | /ScholorshipResult.php | UTF-8 | 3,143 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>query1</title>
<link rel="stylesheet">
<link rel="stylesheet" href="../FinalCss/SearchBox.css">
<header>
<font size="4"><h1 align ="center"> Advance Search Results<img src ="../Img/army-crest.svg" alt="army crest" align="middle"... | true |
367237c21c9af9ddc4841b58bfd19a376ca56047 | PHP | nmulji/Codeup-Web-Exercises | /Input.php | UTF-8 | 2,751 | 3.59375 | 4 | [] | no_license | <?php
class Input
{
/**
* Check if a given value was passed in the request
*
* @param string $key index to look for in request
* @return boolean whether value exists in $_POST or $_GET
*/
public static function has($key)
{
return isset($_REQUEST[$key]);
}
/**
... | true |
a3d013e01c93fc86030b695ab1412f6fb8cc5dd3 | PHP | spgandhi/Google-Sheets-WP-Plugin | /google-sheet.php | UTF-8 | 5,736 | 2.5625 | 3 | [] | no_license | <?php
/*
Plugin Name: Google Sheets API
*/
require_once('google-api-php-client-2.2.1/vendor/autoload.php');
require_once(plugin_dir_path(__FILE__) . '/google-sheet-shortcode.php');
$GoogleSheetsAPIConfig = include('config.php');
class GoogleSheets
{
public $service;
public function __construct()
{
... | true |
10cf7f0f65c39dde304e66281761681558b6c00f | PHP | adlina1/Aestro | /src/model/lieubuilder.php | UTF-8 | 1,467 | 3.15625 | 3 | [] | no_license | <?php
require_once("place.php");
class LieuBuilder{
const NAME_REF= 'nom';
const PLACE_REF= 'endroit';
const LAT_REF= 'latitude';
const LONG_REF = 'longitude';
const OWNER = 'owner';
private $data;
private $error;
public function __construct($d){
$this->data = $d;
$this->error = $d;
}
public f... | true |
925a5ad587ef56a030af2bdb7674a3535070ead9 | PHP | jforster78/Book-Board | /dbConn.php | UTF-8 | 677 | 3.03125 | 3 | [] | no_license | <?php
// Database credentials
$host = "localhost";
$database = "book&board";
$user = "root";
$password = "Uni0fDerby";
// Allows MySQLi to throw exceptions
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
try {
// Try connecting to the database with mysqli_connect
$conn = mysqli_connec... | true |
1f31fda399adf3d876abec62f37825da051fc8a9 | PHP | gabrfer/symfony-blog | /src/AppBundle/Entity/Contact.php | UTF-8 | 2,411 | 2.875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Entity;
/**
* Contact
*/
class Contact
{
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $email;
/**
* @var string
*/
private $message;
/**
* @var \DateTime
... | true |
6965169e3e7eaafaa7b0ff7dd12a848e95692bcf | PHP | qiaoyuan/gitdemo | /state/service/EventDefine.php | UTF-8 | 1,516 | 2.65625 | 3 | [] | no_license | <?php
class EventDefine {
const CMD_A_TO_B = 1;//正常授信,一次返回一个产品
const CMD_B_TO_A = 2;//老用户增信接口
const CMD_B_TO_C = 3;//老用户增信接口
const CMD_STOP = 4;//老用户增信接口
const CMD_C_TO_A = 5;//老用户增信接口
private static $fileterConfig = array(
self:: CMD_A_TO_B => array(),
self:: CMD_B... | true |
53e2cfb0200749ab7c7ca9fb585147adbc1d4db5 | PHP | cangokceaslanx/Blog-Yapiyoruz | /anlik kodlar/blog/Modules/MainPosts/index.php | UTF-8 | 1,649 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class MainPosts{
function __construct(){
}
public function getMainPosts($conn){
?>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<?php $this->getPosts($conn); ?>
<div class="clearfix">
<a class="btn btn-primary f... | true |
4e86d2de84bd7fb53fe40168e24764136acd8c0c | PHP | juliorhode/PHP | /Cookies/Practica (recuerda login)/login_.php | UTF-8 | 3,062 | 2.609375 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
<style>
h1{
text-align: center;
}
table{
width: 25%;
background-color: rgba(1,40,110,1.00);
border: 2px dotted rgba(255,255,255,1.00);
margin: auto;
color: white;
}
.izq{
text-align:
}
.der{
... | true |
0fb04ee269d1956ddc9cbc30ef8f63979b6c9cd1 | PHP | MisakiArt/git_yii_library | /models/User.php | UTF-8 | 1,818 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\web\IdentityInterface;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
/**
* This is the model class for table "{{%user}}".
*
* @property integer $userid
* @property string $username
* @property string $userpassword
*... | true |
c3978088482e033aa4e611e1d6c0c8cdb52c5d83 | PHP | KidamKsnandi/Codingan-Kidam | /jsonapi.php | UTF-8 | 1,399 | 3.0625 | 3 | [] | no_license | <?php
$url = "https://api.kawalcorona.com/";
//persiapan curl / init curl
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, $url);
// Untuk mengembalikan respon data string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// simpan konten dalam variabel $dataCovid
$dataCovid = curl_ex... | true |
259ae796d8b80d313f3fd9854e36b5847022d6f3 | PHP | madoublet/respond-beta | /public/api/users/login.php | UTF-8 | 3,618 | 2.734375 | 3 | [] | no_license | <?php
// load global app
require_once(realpath(__DIR__ . '/..').'/index.php');
// dependencies
use App\Respond\Models\User;
use App\Respond\Models\Site;
use App\Respond\Models\Setting;
use App\Respond\Libraries\Utilities;
// get json
$json = json_decode(file_get_contents("php://input"));
// get ... | true |
4e4a7c85408cf38cc3da5dfec58b85459031be63 | PHP | Afatkharrofiqi/service-repository-pattern-laravel | /demo/app/Services/TodoService.php | UTF-8 | 357 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Repositories\TodoRepository;
class TodoService extends BaseService
{
private $todoRepository;
public function __construct(TodoRepository $todoRepository)
{
$this->todoRepository = $todoRepository;
}
public function baseRepository()
{
r... | true |
5faa2baa4a28c9818d6d064ef0c2429af265c2bc | PHP | sossnowski/split | /app/Services/Bill/BillCreator.php | UTF-8 | 2,127 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\BillParticipantRepository;
use App\Repositories\BillRepository;
use App\Services\BillTransactions;
use Response;
use App\Models\Bill;
class BillCreator
{
protected $billRepository;
protected $billParticipantRepository;
protected $billTransactions;
... | true |
2024b8305d4253a6af88bcd27e8a895a7c06ab83 | PHP | kujawsc/CIT-228-Spring-2019 | /Lesson10/HomeLibrary/Laddentry.php | UTF-8 | 5,479 | 2.59375 | 3 | [] | no_license | <?php
include 'Lconnect.php';
if (!$_POST) {
//haven't seen the form, so show it
$display_block = <<<END_OF_BLOCK
<form method="post" action="$_SERVER[PHP_SELF]">
<fieldset>
<legend>Book Title:</legend><br/>
<input type="text" name="bookstitle" size="20" maxlength="75" required="required"/>
</fields... | true |
8a740193a6bcc9b1c9b67cd1538fb1032228bb35 | PHP | UPGcarts/clientlibrary | /src/Api/GetUser.php | UTF-8 | 901 | 2.84375 | 3 | [] | no_license | <?php
namespace Upg\Library\Api;
use Upg\Library\Config;
/**
* Class GetUser
* APi stub for the getUserData method
* @link https://documentation.upgplc.com/hostedpagesdraft/en/topic/getuserstatus
* @package Upg\Library\Api
*/
class GetUser extends AbstractApi
{
/**
* URI for the user path
*/
co... | true |
1da656d31d24334370659eca4f53f98c0ecd464e | PHP | yudai0627H/text | /admin_memo/home.php | UTF-8 | 1,344 | 2.671875 | 3 | [] | no_license | <?php
require_once('util.php');
session_start();
//DBとの接続
include_once 'dbconnect.php';
if(!isset($_SESSION['user'])){
//ログインしていない場合は、ログインページに移動
header('Location: index.php');
}
//SQL文を$queryへ代入
$query="SELECT * FROM yudai WHERE user_id=".$_SESSION['user']."";//ユーザーIDをキーにDBからユーザー情報を取得
//$queryを実行
$result... | true |
bab3f57b344d4cb6c9d7b6763acaa761979f0f66 | PHP | ricfio/sales-taxes-kata | /www/src/Interfaces/TaxInterface.php | UTF-8 | 248 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Interfaces;
interface TaxInterface
{
public function getRate(): float;
public function getRounding(): RoundingInterface;
public function isApplicable(TaxableInterface $product): bool;
}
| true |
c8cde9c30fa2b5b10bb5d2dbd84d3b0752eed859 | PHP | AroicX/all-in-one | /app/Models/CorpEMT/CompanyModel.php | UTF-8 | 721 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Models\CorpEMT;
use Illuminate\Database\Eloquent\Model;
use DB;
class CompanyModel extends Model
{
protected $table = 'company';
public function add_company($name, $email)
{
$company = DB::table($this->table)->where('name', $name);
$count = $company->count... | true |
ac2c7b479f96cd51318f1f8c053585cc37d36367 | PHP | zakariasamy/ITI-Tasks | /16/3.php | UTF-8 | 139 | 3.0625 | 3 | [] | no_license | <?php
$text = "I Love PHP";
echo strtoupper($text)."<br>" . strtolower($text)."<br>" . ucfirst($text)."<br>";
echo ucwords($text)."<br>";
| true |
613a7fa4801440a0c173086a24801b8917df7b1a | PHP | lzyszts/yd | /application/server/Tree.php | UTF-8 | 5,236 | 3.03125 | 3 | [] | no_license | <?php
namespace app\server;
use think\Db;
/**
* 树列表数据处理类
*/
class Tree
{
/** 递归分类
* @param array $data 权限列表数组
* @param number $pid
*/
public static function get_tree($data,$pid=0,$clear=false){
static $res=array();
if($clear)
{
$res=array();
}
... | true |
27c4d9aeefd696e76ded0e84836a807b344a0a88 | PHP | zblai1000/OneVision | /Admin/signUp.php | UTF-8 | 7,182 | 2.828125 | 3 | [] | no_license | <?php
session_start();
error_reporting(0);
// Check if the user is already logged in, if yes then redirect him to welcome page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
$user = $_SESSION["usernameAdmin"];
}
else{
$user = "Sign In";
}
$username = $pass1 = $pass2 = $pass_match... | true |
6c6c846d87872b074b0118b27805722e6062be50 | PHP | BurloiuCosmin/rest-api-decoupled | /json-transient/init.php | UTF-8 | 3,918 | 2.75 | 3 | [] | no_license | <?php
namespace Json_Transient;
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
class Init {
/**
* Get the array of allowed types to do operations on.
*
* @return array
*
* @since 1.0.0
*/
public function get_allowed_post_types() {
ret... | true |
11766b0ae0802188979f1e5607a4fe8750d920c0 | PHP | NasserAlkar/PHP_Exercises | /Day4/functionExercises/function1.php | UTF-8 | 3,879 | 3.4375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>Exercise 2</h1>
<?php
function smallLarg($x, $y)
{
... | true |
8279c6cba5d4c1b0fd5289ad612ac5208d6212c0 | PHP | MartinProkop/BigBrother | /library/BB/Db/Query/Expresion.php | UTF-8 | 2,165 | 3.109375 | 3 | [] | no_license | <?php
class BB_Db_Query_Expresion implements BB_Db_Query_Interface {
const PLACEHOLDER = "?";
const EXPR_KEY = "ex";
protected $_expresion = "";
protected $_params = array();
public function __construct($data) {
// kontrola dat
if (!is_array($data) || !isset($data[self::EXPR_KEY]))
throw new BB_Db_Q... | true |
c3bf665867edbff1f1fb13cfa46d3bac88e1efa1 | PHP | march1156/missns | /public_html/php/delete.php | UTF-8 | 1,863 | 2.90625 | 3 | [] | no_license | <?php
require_once('../../dbconnect/dbconnect.php');
//ユーザーIDを生成
require('./create_id.php');
//クッキーチェック
$id = "";
$url = "";
if(!empty($_COOKIE['id'])){
$id = $_COOKIE['id'];
}else{
$rid = "";
$rid = random();
setcookie('id',$rid);
$id = $_COOKIE['id'];
}
if(isset($_POST['url'])){
... | true |
39e733458c27f8e63e451dead9ce45d93116321f | PHP | linchew/Linchew-MVC-2.0 | /web/classes/model/BaseModel.php | UTF-8 | 547 | 2.546875 | 3 | [] | no_license | <?php
class BaseModel extends WebModel
{
public function getUserList()
{
$sql="SELECT
*
FROM
`manage_user`
WHERE
`Status`=\"isPublished\"";
$result=$this->query($sql);
return $this->getData_list($result);
}
public function getUserById($userId){
... | true |
b83d8b6506fff1871df614fac95dfa670ddb9c4b | PHP | luckystar990000/send_sms | /fullcourt.php | UTF-8 | 2,842 | 2.9375 | 3 | [] | no_license | <?php
require_once 'HTTP/Request2.php';
class FullcourtError extends Exception { }
function validate_signature($uri, $post_params=array(), $signature, $auth_token) {
ksort($post_params);
foreach($post_params as $key => $value) {
$uri .= "$key$value";
}
$generated_signature = base64_encode(ha... | true |
c5ea1d8bd28761ab6a61b72d010cd53da2acb0c3 | PHP | AndreyMajoroff/arrays_loops_tasks | /19.php | UTF-8 | 645 | 3.65625 | 4 | [] | no_license | <?php
/*19. Составьте массив дней недели. С помощью цикла foreach выведите все дни недели,
а текущий день выведите курсивом. Текущий день должен храниться в переменной $day.
*/
$day = 'Воскресенье';
$arr = array(
'Понедельник',
'Вторник',
'Среда',
'Четверг',
'Пятница',
'Суббота',
'Воскресень... | true |
6f8d49642d7aded53181f0debd5e936e6c2d62ae | PHP | mowema/verano | /vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlock/Tag/AbstractTypeableTag.php | UTF-8 | 2,215 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
n... | true |
ca750212ba56874184b6dc6fe092ef8673eda9f4 | PHP | matikwe/SI-projekt | /actions/chat.php | UTF-8 | 1,331 | 2.53125 | 3 | [] | no_license | <?php
include 'Database.php';
include 'ChatClass.php';
$_SESSION ['emptyMessage'] = "";
$_SESSION ['emptyUserID'] = "";
$database = new Database("blog");
$query = $database->getHandle()->query('SELECT c.id_wiadomosci, c.user_id, u.login, c.tresc, c.data, u.zdjęcie_profilowe FROM czat c INNER JOIN user u ON u.user_id ... | true |
49811c1f9b28601de3029c6dbd9cab37ff62c553 | PHP | deeprahman/uler | /classes/AddEmployee.php | UTF-8 | 1,964 | 3.21875 | 3 | [] | no_license | <?php
namespace classes;
class AddEmployee
{
protected $emp;
protected $db;
public function __construct(array &$emp, object &$pdo)
{
$this->db =& $pdo;
$this->emp = $emp;
// hash the password using PASSWORD_ARGON2I algorithm (PHP >= 7.2.0)
$this->emp['emp_password'] = ... | true |
b8f0edcffc1541bc1f6c4976d32514e3ebce3c8f | PHP | chegmarco1989/parcelg | /app/Models/State.php | UTF-8 | 1,107 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
/**
* Class State
* @package App\Models
* @version July 25, 2019, 5:06 pm UTC
*
* @property string name
* @property integer country_id
* @property string status
*/
class State extends Model
{
public $table = 'states';
public $fillable = [
'... | true |
c38227f020e0a8e3227f14927c6bfc37f9837d08 | PHP | anekdotes/formwrapper | /src/anekdotes/Controls/Rangeselect.php | UTF-8 | 1,776 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Form Wrapper package.
*
* (c) Anekdotes Communication inc. <info@anekdotes.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Anekdotes\FormWrapper\Controls;
use Anekdotes\Support\A... | true |
5a13c7a1ee7bda185771a4155057fbbb7ab1df1c | PHP | stradtkt/OOP-Dashboard-PHP | /admin/includes/user.php | UTF-8 | 3,883 | 3.3125 | 3 | [] | no_license | <?php
class User {
protected static $db_table = "users";
public $id;
public $username;
public $password;
public $first_name;
public $last_name;
public static function find_all_users() {
// global $db;
// $result_set = $db->query("SELECT * FROM users");
// return $r... | true |
240c73a8fba7401003d7269ecee7adae6cc53d51 | PHP | FelipeIzquierdo/histoweb | /database/seeds/AdministrationRoutesTableSeeder.php | UTF-8 | 625 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use \Illuminate\Database\Seeder;
use Histoweb\Entities\AdministrationRoute;
/**
*
*/
class AdministrationRoutesTableSeeder extends Seeder
{
private static $route = [
[
'name' => 'Oral',
'description' => ''
],
[
'name' => 'Sublingual',
'description' => ''
],
[
... | true |
212bca3f5090dfb924faf55e85ac387e6fc429cd | PHP | logancrism/ejemploWebDisqueras | /controller/disquera.php | UTF-8 | 2,157 | 2.640625 | 3 | [] | no_license | <?php
class disquera
{
function __construct(){
}
public function home()
{
$sql_disqueras = new mysql;
$disqueras = $sql_disqueras->consulta('SELECT * FROM disquera ORDER BY nombre ASC');
$smarty = new Smarty;
$tpl = $smarty->createTemplate('templates/main.tpl');
$tpl->assign('disqueras',$disqueras)... | true |
95e555cced5f5b268d407e4ffb6b003b9ad95b55 | PHP | tkachuk/plain-php-rest-api | /App/Controllers/UserController.php | UTF-8 | 991 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Controllers;
class UserController extends Controller
{
/**
* Stub for user collection
*
* @var array
*/
private $usersCollection = [
1 => [
'id' => 1,
'name' => 'Mike',
'position' => 'Developer',
],
5 ... | true |
ea9b436b54de98e55301dbd192342d5788ebf63c | PHP | PitCoder/DistributedDataBases | /Proyecto3prev/php/classes/Sitio.php | UTF-8 | 268 | 2.765625 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
require_once('Relacion.php');
class Sitio{
private $direccion; //String
// private $nombre; //String DEPRECATED
private $contiene; //Relacion array
//CONSTRUCTOR AND GETS
function __construct($sitio) {
$this->direccion=$sitio;
}
};
?>
| true |
33a77af1d5ca04e2ad191d2389b575ab5aaa2785 | PHP | ApostolaT/school-skeleton | /src/Validator/StudentSchoolIdentifierValidator.php | UTF-8 | 365 | 2.734375 | 3 | [] | no_license | <?php
namespace School\Validator;
use School\Dto\RegisterUserDto;
class StudentSchoolIdentifierValidator implements ValidatorInterface
{
private const REGEX = '/(?:^(?:ST|STUD|STUDENT)-\d{4}-\w{2,6}$)/';
/**
* @inheritDoc
*/
public function validate(RegisterUserDto $dto): bool
{
... | true |
28a7302730e78313a65ad44aab17ef2fe5bfad1c | PHP | aoki-minami/PhpBasicTraning | /20160510/006_foreach2.php | UTF-8 | 167 | 3.046875 | 3 | [] | no_license | <?php
$a = ['X'=>'Japan', 1000=>'Sakura', 'Z'=>'Hello'];
var_dump($a);
echo "<br/>"."<br/>";
foreach ( $a as $key => $value) {
echo $key .",". $value ."<br/>";
}
?>
| true |
74e7d25d377ee7f3afd447bcd824e2936622df49 | PHP | UIngSoft/GARESF | /app/Http/Requests/ProductFormRequest.php | UTF-8 | 2,440 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ProductFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that a... | true |
70abc7acd7d194409cad92fdb423fc7108c24ecf | PHP | Davidu93000/motus | /WebContent/Ressources/Scripts/verification_inscription.php | UTF-8 | 2,923 | 2.84375 | 3 | [] | no_license | <?php //Connexion à la BDD
include("connexion_bdd.php");
//Vérification du formulaire lors de l'inscription
if(isset($_POST['forminscription'])) //réception du formulaire
{
$id_groupe=2;
$nom = htmlspecialchars($_POST['lastName']); //Enregistre les informations envoyées
$prenom = htmlspecialchars($_POST['first... | true |
85cd8e5ea52630eb7ea8f17ad550cff8e4745a12 | PHP | Graves-/SICECUI | /model/Generador.php | UTF-8 | 510 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
/**
* CLASE PARA GENERAR UNA CADENA ALEATORIA PARA LAS CONTRASEÑAS DE USUARIOS
*/
class Generador
{
function generateRandomString($length = 10)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$r... | true |
99b81e881178d5a56907f16aa80a1efc8dd1b25e | PHP | telmoricardo/cial_ecommerce | /admin/themes/admin/users/update.php | UTF-8 | 8,711 | 2.5625 | 3 | [] | no_license | <?php
$usuario = new User();
$userController = new UserController();
$idUser = filter_input(INPUT_GET, "cod", FILTER_SANITIZE_NUMBER_INT);
$resultado = "";
$btnEnviar = filter_input(INPUT_POST, 'btnEnviar', FILTER_SANITIZE_STRING);
if($btnEnviar):
$usuario->setUser_name(filter_input(INPUT_POST, 'user_name', FILT... | true |
91d8364c3bc62a72628b0dabc04f946de6cf5110 | PHP | gatotroll96/demo | /libs/Controller.php | UTF-8 | 1,489 | 3.078125 | 3 | [] | no_license | <?php
class Controller{
protected $_view; // thực hiện với View obj
protected $_db; // trong zend là $_model, thực hiện với model obj
protected $_arrData; // trong zend là $_arrParam, arr lấy từ (get và post)
protected $_templateObj; // thực hiện với templateObj
public function __construct(){
... | true |
5173b7fddebb247204e2064bff792959ddcbd3b7 | PHP | sharonmalio/stonewebdev | /module/Users/src/Controller/AuthController.php | UTF-8 | 5,015 | 2.640625 | 3 | [] | permissive | <?php
/**
* StoneHMIS (http://stonehmis.afyaresearch.org/)
*
* @link http://github.com/stonehmis/stone for the canonical source repository
* @copyright Copyright (c) 2009-2018 Afya Research Africa Inc. (http://www.afyaresearch.org)
* @license http://stonehmis.afyaresearch.org/license/options License Options... | true |
c95d6b37b585516e6d12080f2d563f0ac120b25f | PHP | Frodigo/magento-catalog-banners | /Controller/Adminhtml/Banner/Delete.php | UTF-8 | 1,993 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* @copyright Copyright (C) 2020 Marcin Kwiatkowski (http://marcin-kwiatkowski.com)
*/
namespace Mkwiatkowski\CatalogBanners\Controller\Adminhtml\Banner;
use Magento\Backend\App\Action;
use Magento\Backend\App\Action\Context;
use Magento\Backend\Model\View\Result\Redirect;
use Magen... | true |
596cdc1ca590d9602ce5d63237e7b2b4cba7e27b | PHP | pokoot/Rubik | /system/library/form/listing/control/grid.php | UTF-8 | 376 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Library\Form\Listing\Control;
class Grid{
public $yaml;
public function __construct( $yaml ){
$this->yaml = $yaml;
}
public function grid(){
// renders html
$object = new \Library\Form\Listing\Control\Grid\Text( $this->yaml );
... | true |
6df2150465c5648a014fc6611628e5dbf3f48c77 | PHP | im286er/shy | /shy/Http/Middleware/Csrf.php | UTF-8 | 913 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Shy\Http\Middleware;
use Shy\Core\Contracts\Middleware;
use Closure;
use Shy\Http\Facades\Request;
use Shy\Http\Facades\Session;
use Shy\Http\Exceptions\HttpException;
class Csrf implements Middleware
{
/**
* Handle
*
* @param Closure $next
* @param array ...$passable
* @... | true |
f22580dbab2572342b3725153aca8601794fbbb7 | PHP | hiteh/laravel_users | /app/Interfaces/UsersRepositoryInterface.php | UTF-8 | 430 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Interfaces;
interface UsersRepositoryInterface
{
public function hasAny();
public function response();
public function roles();
public function paginated( int $items_per_page, array $query, string $url, string $key );
public function create( array $data );
public function read( string... | true |
ddfccdd342d6b849af6f0d524dbf1f3855d8608f | PHP | igordth/yii.card | /models/GeneratorForm.php | UTF-8 | 1,975 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
use yii\db\Expression;
/**
* GeneratorForm is the model for generate card form.
*/
class GeneratorForm extends Model
{
const EXPIRATION = [
12 => '1 год',
6 => '6 месяцев',
1 => '1 месяц',
];
public $series;
public $c... | true |
66c6e6ee1c90c449a47671b90a9cb774645635db | PHP | Kmohamedamine/OmekHoureiaBack | /core/employeC.php | UTF-8 | 8,940 | 2.890625 | 3 | [] | no_license | <?PHP
include "../config.php";
class EmployeC {
function afficherEmploye ($employe){
echo "Cin: ".$employe->getCin()."<br>";
echo "Nom: ".$employe->getNom()."<br>";
echo "Prénom: ".$employe->getPrenom()."<br>";
echo "salaire: ".$employe->getTarifHoraire()."<br>";
echo "adresse mail: ".$employe->getadresse_m... | true |
bf2e468e8f8bed75712bc74483cac89b5d0c0a4f | PHP | eyelevate/bluebonnet | /app/Http/Controllers/DesignController.php | UTF-8 | 2,567 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Design;
use Illuminate\Http\Request;
class DesignController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Design $design)
{
$columns = $design->prepareT... | true |
6daa840c7fdcd89994d2425d7853c9395800d562 | PHP | shitfSign/vitess | /php/src/VTProto.php | UTF-8 | 8,518 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* This module is used for interacting with associative arrays that represent
* the proto3 structures for Vitess. Currently there's no protobuf compiler
* plugin for PHP that supports maps (a protobuf feature we use), so we can't
* generate the code needed to connect through gRPC. An official PHP plugin fo... | true |
efa6180d0129e162ed7ff656b0f9b39997d3da1f | PHP | ReakingAd/lt_blog | /advanced/console/controllers/RbacController.php | UTF-8 | 1,146 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
// last edited in 2016-11-1
namespace console/controllers;
use Yii;
use yii\console\Controller;
class RbacController extends Controller{
public function actionInit(){
$auth = Yii::$app -> authManager;
// 添加 "createPost" 权限
$createPost = $auth -> createPermission('createPost');
$createPost -> descrip... | true |
dfe0dd03775d2e9acfc5b0764fd515d9f2bbddd0 | PHP | SakineMazlomyar/DynamicRegisterSigninProject | /index.php | UTF-8 | 684 | 2.515625 | 3 | [] | no_license | <?php
include_once("./classes/class.php");
$page = new Page();
$page->title = "Class Page";
$page->navbar = include_once("./view/navbar.php");
$isSubmitted = isset($_GET['page']);
if($isSubmitted){
$nexPage = $_GET['page'];
}else{
$nexPage = 'login';
}
$page->navbar .= include_once("./view/$nexPage.php");
... | true |
2f811502f6af606e10b8161b6c55a8003685bc03 | PHP | armendkrass/PHP_GR41 | /phpFk/header.php | UTF-8 | 1,010 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
if (!isset($_SESSION['email'])) {
header('location: login.php?=login/first');
}
if (isset($_GET['logout'])) {
unset($_SESSION['email']);
session_unset();
session_destroy();
header("location: login.php");
}
?>
<header >
<link rel="stylesheet" type="text/css" href="reset.... | true |
a6c82b4508d44c44218b3c554315f4c77382766b | PHP | twinkle8s/message_board | /LogIn.php | UTF-8 | 1,719 | 2.625 | 3 | [] | no_license | <?php
include_once 'Header.php';
$error=$username=$password='';
if (isset($_POST['username']))
{
$username=sanitize($_POST['username']);
$password=sanitize($_POST['password']);
if ($username=="" || $password=="")
{
$error="*Not all fields were entered";
}
else
{
$query="SELECT username, password FROM memb... | true |
1e43222dbb657534782e7ca02b740913c1d088c7 | PHP | safiraauliafr/indah | /application/views/frontend/produk/produk.php | UTF-8 | 2,393 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
function rating_to_star($value)
{
if ($value < 0)
{
$value = 0;
}
if ($value > 5)
{
$value = 5;
}
$stars = 0;
while ($stars < $value)
{
echo '<i class="fa fa-star text-success" aria-hidden="true"></i>';
$stars++;
}
while ... | true |
b45372f1e126e0e673b5ed89746b4ae195986b15 | PHP | enlitepro/enlite-assetic | /src/EnliteAssetic/Filter/CssVersionUrlFilter.php | UTF-8 | 2,480 | 2.78125 | 3 | [] | no_license | <?php
/**
* @author Vladimir Struts <Sysaninster@gmail.com>
* @date 31.03.2015
* @time 11:00
* @license LICENSE.txt
*/
namespace EnliteAssetic\Filter;
use Assetic\Asset\AssetInterface;
use Assetic\Filter\BaseCssFilter;
use EnliteAssetic\Capistrano;
class CssVersionUrlFilter extends BaseCssFilter
{
/**
... | true |
2e91f2629bb57937218a69d3923b3f03ba14edbb | PHP | MrGottham/websites-osdevgrp | /src/mathias/oswebdb/distance.php | UTF-8 | 6,368 | 2.59375 | 3 | [] | no_license | <?php
// Include required files.
require_once("oswebdb/oswebdb.php");
// Functions for the distance table.
function insert_distance($SystemNo, $FromCountryCode, $FromZipCode, $ToCountryCode, $ToZipCode, $Distance, $Property1, $Property2, $Property3, $Property4, $Property5, $Property6, $Property7, $Property8, $... | true |
b9902c6fa0d43b113354a8b7466d7dfee471ce00 | PHP | lulongwen/blog | /frontend/widgets/banner/BannerWidget.php | UTF-8 | 1,142 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: lulongwen
* Date: 2019-06-02
* Time: 20:45
*/
namespace frontend\widgets\banner;
use Yii;
use yii\bootstrap\Widget;
class BannerWidget extends Widget {
public $item = [
[ 'label' => 'demo',
'img' => '/images/banner/1.jpg',
... | true |
fadabe5a906b5511111b780b9ba0f60bfc95b58d | PHP | FlorianGuillemet/AnnoncesAppartementsV4 | /metier/DemandeAttente.php | UTF-8 | 2,237 | 2.75 | 3 | [] | no_license | <?php
class DemandeAttente{
private $idDemande;
private $idUtilisateur;
private $idAnnonce;
private $radio1;
private $radio2;
private $radio3;
private $messageDemandeClient;
private $dateDemande;
private $nomUtilisateur;
private $prenomUtilisateur;
private $... | true |
0b87cf10c6b2f7a7335cde826f9503fd87994551 | PHP | plopez145780/ifrocean | /Vue/vueAddZone.php | UTF-8 | 10,282 | 2.515625 | 3 | [] | no_license | <?php
$idEtude = filter_input(INPUT_GET, "id_etude", FILTER_SANITIZE_NUMBER_INT);
$bdd = new Modele();
$etude = $bdd->getEtude($idEtude);
$nomEtude = $etude->getNom();
$title = $nomEtude . " : Ajouter une zone";
$nomZone = "";
?>
<!-- Le corps -->
<?php ob_start(); ?>
<sectio... | true |
d1cb784656b783d77fb1f0268b0954ae6797f5be | PHP | coentse/framyii | /service/core/controller/ActionConfig.php | UTF-8 | 6,900 | 2.8125 | 3 | [] | no_license | <?php namespace service\core\controller;
/*
* 作用:保存一个应用的相关设置
*
* 使用方法:
* $config = ApplicationConfig::make('module', 'action', 'request_method');
*
* 设置调用方法
* $config->callMethod('ClassName@methodName');
*
* 设置参数
* $config->parameters(array(
* ParameterContainer::make('参数名称'[, '数据格式'])->value(参数对应值),
*... | true |
ec1807ce5bcb0f6ffaeae3b83ac00780f708cc24 | PHP | 3starblaze/todo-website | /src/entry-deleter.php | UTF-8 | 579 | 2.640625 | 3 | [] | no_license | <?php
// Redirect home
header('Location: /');
$servername = "localhost";
$username = "server";
$password = "yourpassword";
$dbname = "todo";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_erro... | true |
800a00058d2300f021cfd2ddd9d4522f1f48822a | PHP | appsourcecl/Dinam | /database/migrations/2016_01_26_203332_administrador.php | UTF-8 | 847 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Administrador extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('administradores', function (Blueprint $table) {
$table->increments('id');
... | true |
8aa176ccdfa6b75131b6b81fd9e316ba2fc6060a | PHP | rfc1483/padelmvc | /lib/fixtures.php | UTF-8 | 8,721 | 2.828125 | 3 | [] | no_license | <?php
require_once('database.php');
class Fixtures {
public function dropTableTeam() {
try {
$dbh = new Database();
$sql = "DROP table IF EXISTS team";
$sth = $dbh->prepare($sql);
$sth->execute();
$db = null;
} catch (PDOException $e) {
... | true |
57c05dd3495c51b9cd48152def52a150ed51eb88 | PHP | Sywooch/finanasez | /src/backend/v1/requests/BaseRequest.php | UTF-8 | 1,603 | 2.640625 | 3 | [] | no_license | <?php
namespace v1\requests;
use common\forms\Form;
use Yii;
use yii\web\HttpException;
abstract class BaseRequest implements InterfaceRequest
{
/** @var Form */
protected $form;
/**
* @param array|null $data
* @return array
*/
public function process($data = [])
{
try {
... | true |
ee6b71994a44ccd7c0ce8c0e8ffca5e6a9f5747f | PHP | Jovillios/code-challenge-week | /jovillios-message/src/php/dechiffrer.php | UTF-8 | 1,107 | 2.890625 | 3 | [] | no_license | <html>
<head>
<meta charset="utf-8">
<title>Test PhP</title>
</head>
<body>
<h2>Nouveau message</h2>
<?php
$message = $_POST['message'];
$clef = $_POST['clef'];
echo "Le message : '$message' a été déchiffré avec la clé : '$clef' </br>";
$decrypt = "";
for($i = 0; $i < strlen($message); $i++) {
$c... | true |
81a0fcaea33d42ea43b7dd55f5636cf3c362dd20 | PHP | JacopoSciampi/-FE-Alaunt | /[BE]/Alaunt/new-account/script.php | UTF-8 | 2,808 | 2.515625 | 3 | [] | no_license | <?php
include('../func.php');
header('Access-Control-Allow-Origin: *');
header('Content-Type: application/json');
$username = "";
$password = "";
$email = "";
$message = "Backend error";
$isValid = false;
$row_cnt_email = 0;
$row_cnt_username = 0;
$wood = 10000;
$food = 10000;
$stone = 10000;
$iron = 5000;
$ore = ... | true |
e9cb6b2e35ada9637209829d0cff18a1b5301462 | PHP | CommanderXA/LesParcs | /classes/PlanMap.php | UTF-8 | 3,227 | 2.6875 | 3 | [] | no_license | <?php
class PlanMap extends BaseMap {
public function existsPlan(Plan $plan) {
$res = $this->db->query("SELECT plan_id FROM plan WHERE plant_id = $plan->plant_id AND user_id = $plan->user_id");
if ($res->fetchColumn() > 0) {
return true;
}
ret... | true |
42cb080dfbb50f1161fa9ebf32af4995cbf55722 | PHP | LSFLK/Copper | /copper-server/service_images/groupoffice-6.3.66/groupoffice-6.3.66-php-70/modules/billing/vendor/jejik-mt940-master/lib/Jejik/MT940/Parser/Startums.php | UTF-8 | 2,322 | 2.828125 | 3 | [
"Apache-2.0",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"LGPL-3.0-only",
"LicenseRef-scancode-proprietary-license",
"GPL-3.0-only",
"AGPL-3.0-only",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LGPL-2.0-only",
"AGPL-3.0-or-later",
"MIT"
] | permissive | <?php
/*
* This file is part of the Jejik\MT940 library
*
* Copyright (c) 2012 Sander Marechal <s.marechal@jejik.com>
* Licensed under the MIT license
*
* For the full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*/
namespace Jejik\MT940\Parser;
... | true |
531611a79c068c3f6b2f46a0da11821c2f928965 | PHP | EAZYBOT/TestingTasks | /Task1/Task1.php | UTF-8 | 2,556 | 3 | 3 | [] | no_license | <?php
/**
* @param $text - Текст статьи
* @param $link - Ссылка на статью
* @return string - Сокращённый текст статьи
*/
function makeArticlePreview($text, $link) {
// Получаем строку в 200 символов
$result = mb_substr($text, 0, 200);
// Ищем позицию 3-ого пробела
$pos = mb_strlen($result);
fo... | true |