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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
89d74c21d657348ebc6235b1bf7e5b729df71503 | PHP | kenichiromiya/webwritecms | /view.php | UTF-8 | 673 | 2.65625 | 3 | [] | no_license | <?php
class View
{
function getcontents($view,$data = array())
{
global $_LANG;
extract($data);
$cwd = getcwd();
chdir("views");
ob_start();
//include_once("functions.php");
include($view);
$contents = ob_get_contents();
ob_end_clean();
chdir($cwd);
/*
... | true |
f9690cda66f050696d2274ea57f5f9950ee86acd | PHP | adrielcardoso/system_rbc_simple | /src/PlacaChipGrafico.php | UTF-8 | 689 | 2.734375 | 3 | [] | no_license | <?php
class PlacaChipGrafico{
public static $items = [
"4,4" => 'GeForce GTX 950',
"4,5" => 'GeForce GTX 960',
"4,7" => 'GeForce GTX 970',
"4,9" => 'GeForce GTX 980',
"5" => 'GeForce GTX 980 Ti',
"2,5" => 'Radeon HD 7850',
"4,4" => 'Radeon HD 7870',
"2" => 'Radeon HD 7950',
"2,8" => 'Radeon HD 795... | true |
9e768eb4794d9463733297d71364bf2df2b57b49 | PHP | Matl21/sistema_pruebas_tecnicas | /pages/respuestas/mostrarRespuestas.php | UTF-8 | 1,508 | 2.578125 | 3 | [] | no_license | <?php
require_once('./controllers/RespuestasController.php');
require_once('./controllers/EstudianteController.php');
require_once('./class/EntityArray.php');
//Instacia de la clase controlador
$respuestasController2 = new RespuestasController();
//Llenado del arreglo
if (isset($_GET['id_estudiante'])) {
$respuest... | true |
f2b7aaae280b203fd57fbadaa48c353ccd46abd7 | PHP | Shafayatul/Markdom-App | /database/migrations/2019_09_12_094826_add_new_three_fields_to_stores_table.php | UTF-8 | 885 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddNewThreeFieldsToStoresTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('stor... | true |
10b2e8b6333de5b0e1f72368ca775efd30f7b02b | PHP | magenta-consulting/cbook-dev | /libraries/component/Messaging/src/Model/MessageInterface.php | UTF-8 | 1,709 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Bean\Component\Messaging\Model;
use Bean\Component\CreativeWork\Model\CreativeWorkInterface;
use Bean\Component\Thing\Model\ThingInterface;
/**
* A single message from a sender to one or more organizations or people.
*/
interface MessageInterface extends CreativeWorkInterface
{
/**
* @retu... | true |
a85bb1d818aa4ee76fcb496d7526c54b58bb9931 | PHP | MDKP2020/Terekhova | /app/Http/Controllers/DepartmentController.php | UTF-8 | 2,415 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Department;
use App\Http\Requests\DepartmentRequest;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\DB;
class DepartmentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return Resp... | true |
ba4dbff354190539f630ba5feb24e4f827501b9e | PHP | soniamartinezctr/Videoteca | /libs/ENCRYTAR.php | UTF-8 | 1,409 | 3.296875 | 3 | [] | no_license | <?PHP
//FUNCIÓN PARA ENCRYPTAR
function cifrar($contrasena, $numero = 8)
{
$salt = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./';
$saltc = sprintf('$2x$%02d$', $numero);
for($i = 0; $i < 22; $i++)
$saltc .= $salt[ rand(0, strlen($salt)-1) ];
return crypt($contrasena, $saltc... | true |
773d17567b63c3d473e88e848e18828dae4a57fc | PHP | wing8169/jiajia | /php/printResult.php | UTF-8 | 1,982 | 2.765625 | 3 | [] | no_license | <?php
session_start();
require '../fpdf/chinese.php';
// get data
if (isset($_SESSION["type"]) && isset($_SESSION["data1"]) && isset($_SESSION["data2"])) {
$data1 = json_decode($_SESSION["data1"]);
$data2 = json_decode($_SESSION["data2"]);
$header = array('No', 'Add. Name', 'Original Cost (RM)', 'Amount used (g/... | true |
1e9a828682ef671e435644d8a65d17aa3394ae26 | PHP | sjlawson/code_samples | /drupal_modules/mhc_ccrs_manager/includes/classes/MHCCcrsManager/DataAccess/Tables/Ccrs2/EstimatorCommissionSchedules.php | UTF-8 | 3,164 | 2.90625 | 3 | [] | no_license | <?php
namespace MHCCcrsManager\DataAccess\Tables\Ccrs2;
use PDO;
use MHCCcrsManager\DataAccess\Entities\Ccrs2\EstimatorCommissionSchedules as EstimatorCommissionSchedulesEntity;
use MHCCcrsManager\DataAccess\Tables\DatabaseTableInterface;
/**
* Table model for 'ccrs2::estimator_commission_schedules'.
*
* @author ... | true |
432ae30386eec9127f949573fd2bd1cd19d3f43e | PHP | oksvip/Hunt | /app/Models/Traits/Helpers.php | UTF-8 | 1,002 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Traits;
use Carbon\Carbon;
trait Helpers
{
/**
* 人性化显示时间戳
*
* @param $date
* @return string|static
*/
public function hommization($date)
{
return hommization($date);
}
public function getIsActiveAttribute($is_active)
{
retur... | true |
1536b3a632aca2ccea556bb7c855446f6148290c | PHP | jfsimon/GMapBundle | /Formatter/GeocodeCollection.php | UTF-8 | 615 | 2.578125 | 3 | [] | no_license | <?php
namespace GMapBundle\Formatter;
use GMapBundle\Formatter\Collection;
class GeocodeCollection extends Collection implements \Iterator
{
public function filterType($types)
{
if(! is_array($types)) {
$types = array($types);
}
$results = array();
foreach($this-... | true |
5fc517158fafeeaa66a27a70230a518251dbb123 | PHP | RostTs/Kinopoisk-parser-randomizer | /parser.php | UTF-8 | 1,456 | 2.96875 | 3 | [] | no_license | <?php
$curl = curl_init(); //$curl is datatype curl resource
$url = "https://www.kinopoisk.ru/top/";
curl_setopt($curl,CURLOPT_URL, $url); // Set proper url
curl_setopt($curl, CURLOPT_ENCODING ,"utf-8"); // Set charset to utf-8
curl_setopt($curl,CURLOPT_RETURNTRANSFER, true); // Execute in va... | true |
92e1196ebf5f142293781f8239e8eb8428ed2d2b | PHP | amyrhaq/Functions-Part-1 | /math-functions-2.php | UTF-8 | 459 | 3.984375 | 4 | [] | no_license | <!-- Use the editor to print a random number. Then use use your knowledge of strlen(), substr(), and rand() to print a random character from your name! -->
<html>
<p>
<?php
//Use rand() to print a random number to the screen
echo floor(rand(1,4));
?>
</p>
<p>
<?php
//Use strlen(), substr(), and rand() to print a random... | true |
7a4abe35870dde122262752fc03573f631ad0463 | PHP | dlussky/herach_online | /library/Auth/AuthProcessor.php | UTF-8 | 1,391 | 2.703125 | 3 | [] | no_license | <?php
namespace Auth;
use Auth\Strategy\AuthStrategyProto;
class AuthProcessor extends AuthModuleProto
{
/**
* @var AuthStrategyProto[]
*/
private $strategies = [];
private $resultStrategy = [];
public function addStrategy (AuthStrategyProto $strategy)
{
$this->stra... | true |
d510fff11b8a9a1a810cc04f85b450f7f0f65afc | PHP | douglasgalico/pdfbenchmark | /pdfbench/setup1/Pdf.php | UTF-8 | 1,819 | 2.75 | 3 | [] | no_license | <?php
require_once('tcpdf_include.php');
/*
define('BENCHMARK_PAGES', 50);
for($i=0;$i < BENCHMARK_PAGES;$i++){
$pdf->AddPage();
$text = loadTemplate('teste.php',['ta' => '438gdf43']);
$pdf->writeHTML($text, true, 0, true, 0);
}
*/
class Pdf {
var $pdf;
public function __construct(){
$this-... | true |
7abd30793cf630cef64467e8f2b98bad4e84465e | PHP | arima-ryunosuke/php-functions | /src/Package/strings/str_array.php | UTF-8 | 2,792 | 3.0625 | 3 | [] | no_license | <?php
namespace ryunosuke\Functions\Package;
// @codeCoverageIgnoreStart
require_once __DIR__ . '/../var/is_stringable.php';
// @codeCoverageIgnoreEnd
/**
* 文字列を区切り文字で区切って配列に変換する
*
* 典型的には http ヘッダとか sar の結果とかを配列にする。
*
* Example:
* ```php
* // http response header を ":" 区切りで連想配列にする
* that(str_array("
* HTTP... | true |
d346a190ea0a60d9cdaa1863169061339a3a03f8 | PHP | Wesley-yuri/Bbook | /console/seeder/tables/GenreTableSeeder.php | UTF-8 | 483 | 2.625 | 3 | [] | no_license | <?php
namespace console\seeder\tables;
use antonyz89\seeder\TableSeeder;
use console\seeder\DatabaseSeeder;
use common\models\Genre;
/**
* Handles the creation of seeder `genre`.
*/
class GenreTableSeeder extends TableSeeder
{
/**
* {@inheritdoc}
*/
function run()
{
loop(function ($i)... | true |
cc9de0b5740b2507d32b0961a7b0c9a6107ff6a3 | PHP | SekmSet/my_meetic | /src/Command/SearchCommand.php | UTF-8 | 1,142 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Command;
use PDO;
class SearchCommand extends BaseCommand
{
public function recherche_membre($ville,$cp,$loisir,$gender,$age_min,$age_max){
$array_filter = [];
$array_execute = [];
if(!empty($ville)){
$array_filter[]= "ville like binary :ville";
... | true |
7024ac0a4773319c1d85e6507cbf5e16d110e263 | PHP | YeaminRaat/oop_blog | /app/classes/Category.php | UTF-8 | 1,983 | 2.875 | 3 | [] | no_license | <?php
namespace App\classes;
class Category
{
function addCategory($data)
{
$c_name = $data['category_name'];
$c_status = $data['status'];
$sql = "INSERT INTO `category`(`category_name`, `status`) VALUES ('$c_name', '$c_status')";
$result = mysqli_query(Database::dbConn(), $sql);
if ($result) {
$mess... | true |
f7455a79adfa07f2a320c8d1f2851e3e47607889 | PHP | LeX1978/Kemp | /pages/tree.php | UTF-8 | 3,795 | 2.546875 | 3 | [] | no_license | <?
//Рисуем каталоги
$s1="SELECT * FROM katalog";
$q1 = mysql_query($s1);
while($r1 = mysql_fetch_assoc($q1)) {
echo '<li><a href="#" style="border: none;"><img src="/images/'.$r1['image'].'" alt="Мини-погрузчики"></a>';
if($r1['id'] == $katalog) {
$class = 'class="active"';
}
else {
$class = ... | true |
915e5aa5ac333abb768ef639a687642084a65c30 | PHP | modstart/ModStartCMS_Laravel9 | /module/Vendor/QuickRun/Crawl/CrawlerRunnerCommand.php | UTF-8 | 1,792 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Module\Vendor\QuickRun\Crawl;
use Illuminate\Console\Command;
use ModStart\Core\Util\CodeUtil;
use ModStart\Core\Util\FileUtil;
class CrawlerRunnerCommand extends Command
{
protected $signature = 'crawler-runner {path}';
/**
* @var AbstractCrawler[]
*/
private $crawlers = [];
... | true |
c3133e1ea29a953bd177a17cbda88fc32ac0f077 | PHP | bobmagicii/dallasphp-201611-phinx | /20161108054004_create_user_comments_table.php | UTF-8 | 764 | 2.5625 | 3 | [] | no_license | <?php
use Phinx\Migration\AbstractMigration;
class CreateUserCommentsTable
extends AbstractMigration {
public function
Up() {
$this->Execute(<<< LOL
CREATE TABLE `UserComments` (
`CommentID` INT(11) UNSIGNED NOT NULL,
`UserID` INT(11) NOT NULL,
`Time` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`M... | true |
46bac7132124f54632b4759cf5c85a8c74ecb167 | PHP | hovo99/Feedback | /Core/Validation.php | UTF-8 | 1,549 | 2.875 | 3 | [] | no_license | <?php
namespace Core;
class Validation {
public static function validMessage(){
$name = $_POST['first_name'];
$lname = $_POST['last_name'];
$email = $_POST['mail'];
$message = $_POST['message'];
$errors = [];
if (!$lname){
$lname = " ";
}
... | true |
330b2391db1c7adc39649680aa68e63e7e1d4f48 | PHP | MikoVelRa/Web_API_Restful | /backend/consultas.php | UTF-8 | 707 | 2.921875 | 3 | [] | no_license |
<?php
include 'conexion.php';
$conn = new Conexion();
function addTodo($todo)
{
$insert = "INSERT INTO todos(nombre, descripcion, categoria, fecha_limite, estado)
VALUES(:nombre, :descripcion, :categoria, :fecha_limite, :estado)";
global $conn;
$stmt = $conn->conectar()->prepare($inser... | true |
5e9b009e13b4ed3b64c402d88b972fd99341eec6 | PHP | sedaceylann/LotusKitapevi | /LotusKitapEvi-PHP-main/LotusKitapEvi-PHP-main/admin/urun/ekle.php | UTF-8 | 4,667 | 2.65625 | 3 | [] | no_license | <?php include "../header.php"; ?>
<div class="container">
<div class="page-header">
<h1>Ürün Ekle</h1>
</div>
<?php
if($_POST){
// veritabanı yapılandırma dosyasını dahil et
include '../../config/vtabani.php';
try{
// kayıt ekleme sorgusu
$sorgu = "INSERT INTO urunler SET urunadi=:urunadi, aciklama=:aciklama,
fi... | true |
cd989d9de2e9536ea0df06fb78b2d47d5000871b | PHP | dapc21/inmueble | /app/Http/Controllers/LogController.php | UTF-8 | 1,753 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Requests\LoginRequest;
use App\Http\Controllers\Controller;
use Auth;
use Redirect;
class LogController extends Controller
{
/**
* Create a new authentication controller instance.
*
* @return voi... | true |
6b5b0ba0093a5d29946aa945efc0820333c82cde | PHP | marjaygab/ReQuench_REST | /Update_Seen.php | UTF-8 | 2,053 | 2.53125 | 3 | [] | no_license | <?php
require 'ConnectDB.php';
header('Content-Type: application/json');
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Credentials: true");
header("Access-Control-Max-Age: 1000");
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Cache-Control, Pragma, Authori... | true |
536053c5402e3e5dc54c2e077d07d01ecffab2f7 | PHP | Dheia/oc-shop-plugin-old | /models/Currency.php | UTF-8 | 1,203 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace Bedard\Shop\Models;
use Model;
class Currency extends Model
{
public $implement = ['System.Behaviors.SettingsModel'];
public $settingsCode = 'bedard_shop_currency';
public $settingsFields = 'fields.yaml';
/**
* Returns the currency code being used
*
* @return string ... | true |
73debee3c0f0408666f1a500199f6cf0119a85bd | PHP | Jacqu82/CinemaAndAdminPortal | /Miniportal/Search.php | UTF-8 | 3,476 | 3 | 3 | [] | no_license | <h3>Wyświetl informacje spośród wszystkich kin, filmów, biletów, dat i metod płatności</h3>
<form method="post" action="#">
<input type="radio" name="cinema">Lista kin<br/>
<input type="radio" name="movie">Lista filmów<br/>
<input type="radio" name="ticket">Lista biletów<br/>
<input type="radio" name="p... | true |
5cfdbc2ea9cc704b25e90c32045c5dede034012c | PHP | alexgimson86/HoHbackendCode | /registerAccount.php | UTF-8 | 3,114 | 2.640625 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin : *');
include 'connection.php';
ini_set("display_errors", "1");
error_reporting(E_ALL);
$email = $_POST['email'];
$pw = $_POST['password'];
$sex = $_POST['sex'];
//$avatarUrl = $_POST['avatarUrl'];
$heroOneAv = $_POST['heroOneAv']... | true |
4875d64b1d3220cffbac0f87a1a59cd322ed78ff | PHP | juandomingo/proyecto | /model/Configuracion.php | UTF-8 | 920 | 3.09375 | 3 | [] | no_license | <?php
/**
* Description of Alimento
*
* @author Tino
*/
class Configuracion {
private $id;
private $clave;
private $valor;
private $nombre;
public function __construct($id, $clave, $valor, $nombre) {
$this->id = $id;
$this->clave = $clave;
$this->valor = $valor... | true |
a343898ab25bc322d3cb1619efa1652c3683cd60 | PHP | jakowicz/www.acebulletin.com | /app/bootstrap/setup.inc.php | UTF-8 | 1,041 | 2.609375 | 3 | [] | no_license | <?php
function componentAndModuleAutoload($class) {
$locations = array(
'components' => array(
array(
'@component@',
'@model@'
),
'components/@component@/models/@model@.inc.php'
),
'modules' => array(
array(
'@module@',
'@class@'
),
'modules/@module@/classes/@class@.inc.php'
... | true |
5aa1a32699016723da86bed9788657162cdd37b7 | PHP | WilsonKinyua/school | /admin/includes/view_news.php | UTF-8 | 2,037 | 2.625 | 3 | [] | no_license |
<table class="table table-bordered table-hover">
<thead>
<tr class='table-info'>
<th>Id</th>
<th>Title</th>
<th>Category</th>
<th>Author</th>
<th>Content</th>
<th>Image</th>
<th>Date</th>
... | true |
a7cda45f39b23966c2767c7a5570f0a31e3763ad | PHP | maxgorovenko/ghtweb | /application/models/settings_model.php | UTF-8 | 4,056 | 2.546875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Settings_model extends Crud
{
public $table = 'settings';
private $_fields = array('key', 'value', 'name', 'description', 'group_id', 'type', 'param');
public function get_fields()
{
return (isset(... | true |
4d62853ce165aef6637b78716d3cff40bbbf6ac8 | PHP | Luis213243/agenda | /Agenda1/final/clases/crud.php | UTF-8 | 1,380 | 2.890625 | 3 | [] | no_license | <?php
class crud{
public function agregar($datos){
$obj= new conectar();
$conexion=$obj->conexion();
$sql="INSERT into t_categorias (nombre_cateoria,descripcion,fechaInsert)
values ('$datos[0]',
'$datos[2]',
'$datos[1]'
)";
return mysqli_query($conexion,... | true |
e4f83163441ed74d1c9e1679b00b03987cb7e1b0 | PHP | yanquisalexander/Kodular-Socialite | /Provider.php | UTF-8 | 3,147 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace SocialiteProviders\Kodular;
use GuzzleHttp\ClientInterface;
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
use SocialiteProviders\Manager\OAuth2\User;
class Provider extends AbstractProvider
{
/**
* Unique Provider Identifier.
*/
const IDENTIFIER = 'KODULAR';
/**
... | true |
cfad12e3a5d364ffc79b5d93415e7817fcf179e9 | PHP | 8kto/dev-scritps | /php/symfony/symfony-form-type-gen.php | UTF-8 | 18,359 | 2.859375 | 3 | [] | no_license | #!/usr/bin/env php
<?php
/**
* Generate form type layout for Symfony entity
*
* @author Igor Okto <web@axisful.info>
*
* Usage:
* Get documentation:
* ./symfony-form-type-gen.php --help
*
* Get buildForm method for form type:
* ./symfony-form-type-gen.php --build-form-method --entity src/Entity/S... | true |
e781ad6a6550c5a848bb153a85f34799bcce4d9b | PHP | rjuanferragut/mensakas | /database/migrations/2020_02_10_000001_create_zones_table.php | UTF-8 | 647 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateZonesTable extends Migration
{
public function up() {
Schema::create('zones', function(Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments... | true |
e6ec6a60a7eecbc10fdbcf63fb48918373abece7 | PHP | Jefinho174/aps-php | /Config/Connection.php | UTF-8 | 714 | 2.984375 | 3 | [] | no_license | <?php
namespace Config;
class Connection
{
public function __construct()
{
$a = func_get_args();
$i = func_num_args();
if (method_exists($this, $f = '__construct' . $i)) {
call_user_func_array(array($this, $f), $a);
}
}
public static function GetConnection(... | true |
6ad1990d6ab96118867f9c38f0469ea7ced4e2d0 | PHP | ericdelacruz/Milupa-Click-and-Win | /application/models/userprize.php | UTF-8 | 2,247 | 2.703125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class UserPrize extends CI_Model
{
public $id;
public $prizes;
public $user_id;
public $prize_id;
public $date_received;
function __construct()
{
parent::__construct();
}
//Add a Winner
public function addWinner($use... | true |
a36ee7baa0e569609fff3530755a732d615f8dc0 | PHP | m9993/webtecProject | /Group Merged/mahmudul/updatet.php | UTF-8 | 1,964 | 2.515625 | 3 | [] | no_license | <?php
ob_start();
include 'config.php';
if (isset($_POST['done'])) {
$id_new = $_POST["id_new"];
$hour_new = $_POST["hour"];
$id = $_GET['ID'];
$q = "UPDATE workingtime SET u_id='$id_new', t_hour='$hour_new' WHERE u_id='$id'";
$query = mysqli_query($con, $q);
header('location:... | true |
4d4edc2f5c4e6eed9d23dae42e32a692747af174 | PHP | kodus/tempkit-fs | /tests/unit/TempFileServiceCest.php | UTF-8 | 4,101 | 2.609375 | 3 | [] | no_license | <?php
namespace Kodus\TempKit\Test;
use Kodus\Helpers\UUID;
use Kodus\TempKit\TempFile;
use Kodus\TempKit\TempFileRecoveryException;
use Kodus\TempKit\TempFileService;
use League\Flysystem\Filesystem;
use League\Flysystem\Memory\MemoryAdapter;
use League\Flysystem\Plugin\ListPaths;
use UnitTester;
use Zend\Diactoros\... | true |
7a9febb33e75a96d8ed5aa88bad0a970d5b7602f | PHP | deyvisonrocha/plataforma-ensino-desafio-pluri | /app/Http/Controllers/StudentController.php | UTF-8 | 1,828 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Student;
use App\Http\Resources\StudentResource;
use App\Http\Requests\Students\StudentStoreRequest;
use App\Http\Requests\Students\StudentUpdateRequest;
class StudentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return ... | true |
793dbcf84918ce41118814381098614ea5086bc3 | PHP | onibusiness/minha_oni | /includes/automacoes/cria_projetos_class.php | UTF-8 | 20,250 | 2.703125 | 3 | [] | no_license | <?php
/*
* cadastra projetos
* Classe que automatiza toda a criação de projetos a partir do webhook
*/
class cadastra_projetos{
public $nome_projeto_cadastrado; // nome do projeto
public $table_record_projeto; // record do pipefy de projeto da database projeto
public $table_records_frentes; // records do p... | true |
1499a159db6cc595dba41cc548c59de4dd427268 | PHP | yiyueqinghui/php-study | /function/14.php | UTF-8 | 1,245 | 4.0625 | 4 | [] | no_license | <?php
//demo1 可变函数
//PHP 支持可变函数的概念。这意味着如果一个变量名后有圆括号,PHP 将寻找与变量的值同名的函数,并且尝试执行它。
//可变函数可以用来实现包括回调函数,函数表在内的一些用途。
function add(){
echo "add number <br/>";
}
function reduce(){
echo "reduce <br/>";
}
function totals($score,$score02){
echo $score*$score02."<br/>";
}
$funcName = "add";
$... | true |
ccf0f02aa134febeb21bc60064d6744287849201 | PHP | albertpatera/ap-vendor-form | /Forms.php | UTF-8 | 3,727 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Project\Classes;
/**
* Creting input type: TEXT, PASSWORD, EMAIL, SUBMIT
* @Method: addText();
* addPassword();
addSubmit();
addEmail();
addGroup()
* @package Project\Classes
* @param name, Label
*/
class Forms
{
private $type;
private static $label;
private ... | true |
4efae1e8e5b9853f862bafc07a7a6c2c8eb33d2d | PHP | TiagoCaetanoPT/Aplicacoes-para-internet | /Projetos/teoria/10/10.laravel/app/Http/Controllers/UserController.php | UTF-8 | 2,058 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
class UserController extends Controller
{
public function index()
{
$users = User::All();
$pagetitle = "List of Users";
return view('users.list', compact('users', 'pagetitle'));
}
public functio... | true |
5de458679bb1fcdb04131921b92003613691f3be | PHP | kvh44/u2 | /utoconsult2/src/AppBundle/Entity/UtoconsultFile.php | UTF-8 | 8,346 | 2.6875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
/**
* UtoconsultFile
*/
class UtoconsultFile
{
/**
* @var integer
*/
private $id;
/**
* @var integer
*/
private $userId;
/**
* @var integer
*/
private $categoryId;
/**
* @var string
*/
private $title;
/... | true |
6b04b8f7668ffc6c17dc550d3478a26494e585b6 | PHP | miniguez/almacen | /protected/controllers/ProductosController.php | UTF-8 | 6,547 | 2.578125 | 3 | [] | no_license | <?php
class ProductosController extends Controller
{
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout='//layouts/column2';
/**
* @return array action filters
*/
public func... | true |
c7f38c8b69b63debe167f62818d63910c5607b68 | PHP | UmidAbdu/kriogaz | /projects.php | UTF-8 | 1,222 | 2.53125 | 3 | [] | no_license | <?php include "includes/header.php";
include "includes/db.php";
?>
<section style="padding-bottom:40px " class="d-flex justify-content-center align-items-center flex-column">
<div class="news_div">
<h1 style="font-weight: bold;">Реализованные проекты</h1>
</div>
<?php
$query = "SELECT * FROM pr... | true |
3976a0843a23bcbb2726ff53aa5ad4e2e55fbb51 | PHP | dimichspb/yii2-advanced-books | /console/migrations/m151112_095253_adding_testdata_authors_table.php | UTF-8 | 835 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Schema;
use yii\db\Migration;
class m151112_095253_adding_testdata_authors_table extends Migration
{
public function up()
{
$this->batchInsert('{{%authors}}',
['firstname', 'lastname'], [
['Александр', 'Пушкин'],
['Александр', 'Дюма'],
... | true |
0d288e3e8c7c349c838c09d43a0bc304c11c1961 | PHP | WendyGraphex/jobs-application | /modules/services_smsbox/admin/actions/ajaxNewModelAction.class.php | UTF-8 | 1,457 | 2.5625 | 3 | [] | no_license | <?php
require_once __DIR__ . "/../locales/Forms/SmsBoxModelNewForm.class.php";
class services_smsbox_ajaxNewModelAction extends mfAction
{
function execute(mfWebRequest $request)
{
$messages = mfMessages::getInstance();
try
{
$this->item = new SmsBoxModel();
... | true |
4ee1fa1e2106a47ac2fc1d55c7c2079275b105ae | PHP | JBadenhorstSA/GlideMan | /flights_add.php | UTF-8 | 11,969 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GlideMan</title>
<link href="styles... | true |
859609d1f611414337f5dc677d1fd49b04dfbd44 | PHP | ecoride/version-2 | /ecoride.arteveldehogeschool.local/www/app/Providers/AppServiceProvider.php | UTF-8 | 969 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php namespace StartMeUp\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* This service provider is a gre... | true |
364842e07a2a3f96b1d6804d614258e5b3af1b5d | PHP | hujinhuaP/paopao_Interface | /api/app/modules/v1/services/ChatStreamService.php | UTF-8 | 1,319 | 2.5625 | 3 | [] | no_license | <?php
/*
+------------------------------------------------------------------------+
| Green Live |
+------------------------------------------------------------------------+
| Copyright (c) 2017-2018 Green Live Team (https://www.greenlive.com) |
+---... | true |
f1ffaa25b9bead6133c7d4773cec54d338b609b1 | PHP | AbdelazizTina-dev/Diary-Server | /app/Http/Controllers/DiaryController.php | UTF-8 | 1,470 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Diary;
use Illuminate\Auth\Events\Validated;
use Illuminate\Http\Request;
class DiaryController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
6ec2b9e46d65563823791e3f9d806dd2c5a74bd8 | PHP | roiprez/et3-iu-spartans | /Controllers/NOTAS_Controller.php | UTF-8 | 4,915 | 2.734375 | 3 | [] | no_license | <?php
/*
Controlador que se encarga de gestionar las peticiones de lectura y escritura de datos al modelo de notas.
08/12/2017 por IU SPARTANS
*/
include_once '../Models/NOTAS_Model.php';
include_once '../Models/TRABAJOS_Model.php';
include_once '../Models/ENTREGAS_Model.php';
include_once '../Functio... | true |
87104fc55334a60ecc35b2fabcac00cadd3ca727 | PHP | II-Zor-II/php-movie-webapp | /php-movie/add_tvshow.php | UTF-8 | 865 | 2.578125 | 3 | [] | no_license | <?php
include_once "templates/header.php";
include_once 'config/db.php';
include_once 'objects/tvshow.php';
$database = new Database();
$db = $database->getConnection();
$tvshow = new TvShow($db);
include_once "templates/upload_img.php";
if($_POST){
// set properties
$tvshow->title = $_P... | true |
7d24fba8c84ccc36d037f84560005f8318d49fe2 | PHP | AntonioCS/Framework | /base/helpers/helper_marker.php | UTF-8 | 430 | 2.953125 | 3 | [] | no_license | <?php
class helper_marker {
private static $markers = array();
public static function mark($name) {
self::$markers[$name] = microtime(TRUE);
}
public static function marktime($name,$format = false) {
if (isset(self::$markers[$name])) {
$t = (microtime(TRUE) - self::$markers[$name]);
unset(self:... | true |
048fa7c0b3801da3e8804cb1718c5eff97565711 | PHP | FrancoisPog/La-gazette-de-l-INFO | /php/bibli_generale.php | UTF-8 | 11,431 | 3.015625 | 3 | [] | no_license | <?php
/*################################################################
*
* Generic functions librarie
*
* > My libraries functions are prefixed by cp_
* > My local functions are prefixed by cpl_
*
* > I organize my functions in several domains :
* _p... | true |
67e7ed14f29a592378542a6cd14e75ec31dc4b1d | PHP | LapWorkDAW/LapBack | /models/Inscription.php | UTF-8 | 3,864 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: UriiGrao
* Date: 28/11/2018
* Time: 12:56
*/
require_once 'BDs.php';
class Inscription extends BDs
{
protected $idInscription; // id de la inscripcion.
protected $userO; // Guardaremos el usuario inscrito en el proyecto.
protected $project; // Guardaremos el pr... | true |
ff164cf5f8d2c363f06ff66c4a5b7c717a56cc4c | PHP | DarkGhostHunter/Preloader | /src/PreloaderLister.php | UTF-8 | 3,628 | 2.984375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace DarkGhostHunter\Preloader;
use const DIRECTORY_SEPARATOR;
class PreloaderLister
{
/**
* List of opcache file list.
*
* @var array
*/
public array $list;
/**
* Memory limit for the list.
*
* @var float
*/
public float $memory = Preloader::MEMORY... | true |
186b1ea6d06e3d53c736392b799f16eacd91d75f | PHP | salsabeeltolba/PatientTransitApplication | /app/Events.php | UTF-8 | 686 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Calendar;
class Events extends Model
{
protected $table = 'events';
protected $fillable = ['event_name', 'event_time'];
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
/**
* Is it an al... | true |
c51efe6543c59637d793dfd2317f344b8f3827b1 | PHP | torgi47/ccmusicsearch | /tests/Service/SearchPerformerTest.php | UTF-8 | 1,275 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Tests\Service;
use App\Service\ApiServiceFactory;
use App\Service\SearchPerformer;
use App\Tests\Model\SongRecordStub;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
class SearchPerformerTest extends TestCase
{
public function testSearch()
{
... | true |
f237c31f2b2aa351e5816281824bc637b7fb533b | PHP | mmgx/laravel_weather | /database/seeders/UserSeeder.php | UTF-8 | 1,889 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use App\Models\User as Model;
use Illuminate\Support\Str;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
... | true |
5638f1845dbbe2f6b95c107849b115d4186bcb8f | PHP | gponty/testMessenger | /src/Command/ExecuteTraitementCommand.php | UTF-8 | 1,429 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Command;
use App\Entity\Traitement;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symf... | true |
fefb52a3a460c2a563597f0e13200a5b0949faea | PHP | ranielm/php-dist | /principal/pages/inserirprodutos.php | UTF-8 | 3,471 | 2.703125 | 3 | [] | no_license | <?php
$nome = $_POST['nome'];
$quantidadetotal = $_POST['quantidadetotal'];
$alertadeexpiracao = $_POST['alertadeexpiracao'];
$datadeexpiracao = $_POST['datadeexpiracao'];
$ehperecivel = $_POST['ehperecivel'];
$fabricante = $_POST['fabricante'];
$estoqueminimo = $_POST['estoqueminimo'];
$setor = $_POST['setor'];
$tipo... | true |
10de640b24a8ba3f87c27858ed0800a34fc1f012 | PHP | AVBLANCO/SmartAgro | /Servidor/facade/LecturaevotranspiracionFacade.php | UTF-8 | 5,749 | 2.6875 | 3 | [] | no_license | <?php
/*
-------Creado por-------
\(x.x )/ Anarchy \( x.x)/
------------------------
*/
// Vine a Comala porque me dijeron que acá vivía mi padre, un tal Pedro Páramo. \\
require_once realpath('../facade/GlobalController.php');
require_once realpath('../dao/interfaz/IFact... | true |
9449308d1e03d7df935d38c32ee78b7d1927a597 | PHP | TanzimIbthesam/PHP--All-in-One- | /Array/arrayunshift.php | UTF-8 | 223 | 3.25 | 3 | [] | no_license | <?php
//The array_unshift() function inserts new elements to an array. The new array values will be inserted in the beginning of the array.
$a=array("a"=>"red","b"=>"green");
array_unshift($a,"blue");
print_r($a);
?> | true |
ed2ee3b4cf0e7b4693f9dad76c3b66e1ddac163b | PHP | dmitranoid/egraph1 | /src/App/Services/Export/ExportEnergoTree.php | UTF-8 | 1,332 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Services\Export;
use Envms\FluentPDO\Query;
use PDO;
class ExportEnergoTree
{
/**
* @var PDO
*/
private $pdo;
public function __construct(PDO $pdo)
{
$this->fpdo = new Query($pdo);
}
public function export($region = null, $lev... | true |
4395e7eb5e634f4697af5fcefb4dfac51d5a19be | PHP | elfinsanjaya12/point-of-sale | /storage/framework/views/a64cc74a93d4eb0689ccd51aa27a1d41f7a99805.php | UTF-8 | 3,401 | 2.5625 | 3 | [
"MIT"
] | permissive |
<?php $__env->startSection('judul'); ?>
Laporan Persediaan
<?php $__env->stopSection(); ?>
<?php $__env->startSection('print'); ?>
<table>
<tr>
<td><h3>Nama Penjaga</h3></td>
<td><h3> : <?php echo e(Auth::user()->name); ?></h3></td>
</tr>
<tr>
<td><h3>Periode</h3></td>
<td>... | true |
90a2d7e4766c513bbff86d3033e76fa2454711a6 | PHP | opensalt/opensalt | /core/src/Command/Framework/CopyItemToDocCommand.php | UTF-8 | 771 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Command\Framework;
use App\Command\BaseCommand;
use App\Entity\Framework\LsItem;
use App\Form\DTO\CopyToLsDocDTO;
use Symfony\Component\Validator\Constraints as Assert;
class CopyItemToDocCommand extends BaseCommand
{
#[Assert\Type(CopyToLsDocDTO::class)]
#[Assert\NotNull]
private Cop... | true |
244fbe234b7f461f5321c0dfa916112620d59e76 | PHP | MattLeuterio/php-oop-dipendenti | /exception.php | UTF-8 | 601 | 3.171875 | 3 | [] | no_license | <?php
/**
* MYCLASS
*/
class salaryUtilities {
// Methods
public function annualSalary($sal) {
if(!is_int($sal)) {
throw new Exception('Operation unavailable');
}
return $sal * 13;
}
}
$sUtil = new salaryUtilities();
// perform Operation
try {
echo $sUtil-... | true |
50075774178d2f308c95099e79e9d1fff98063da | PHP | Qoyyuum/RIPAS-Blood-Bank | /webapp/header.php | UTF-8 | 634 | 2.640625 | 3 | [] | no_license | <?php
require_once("DB.php");
require_once("config.php");
DB::setup(DB_NAME, DB_USER, DB_PASS, DB_HOST);
DB::debug();
$temp_data=json_decode(file_get_contents("blood_types.json"));
$status_level=array("N/A","very low","low","ok");
$blood_type=array();
foreach($temp_data as $b){
$blood_type[$b[0]]=array("give"=>explode... | true |
bf94148e5ebabb76af4cd4785616e17837c1bd61 | PHP | q0821/esportshop | /components/com_jfbconnect/libraries/profile/instagram.php | UTF-8 | 4,055 | 2.65625 | 3 | [] | no_license | <?php
/**
* @package JFBConnect
* @copyright (c) 2009-2015 by SourceCoast - All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version Release v6.4.2
* @build-date 2015/08/24
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or... | true |
22563a8ac2c01a26207a362632f3eea54c13568f | PHP | dawx7777/Project_Managment_SportObject | /admin/functions.php | UTF-8 | 1,052 | 2.671875 | 3 | [] | no_license | <?php
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASSWORD", "");
define("DB_DATABASE", "orlikowa");
$connection = new mysqli(DB_SERVER , DB_USER, DB_PASSWORD, DB_DATABASE);
if ($connection->connect_error) die("Błąd krytyczny");
function createTable($name, $query)
{
queryMysql(... | true |
f4acb3c96152bf7067a01d9a2edeb4b4967c24d1 | PHP | marcolopz/tumitalento | /PARTE 1/Problema 01/Cadena.php | UTF-8 | 1,377 | 3.609375 | 4 | [] | no_license | <?php
//ini_set('default_charset', 'utf-8');
class Cadena {
public function construir(string $cadena) {
$resultado = "";
$letras = mb_str_split($cadena);
foreach($letras as $clave=>$valor) {
$resultado .= $this->siguiente($valor);
}
return $resultado;... | true |
72297e965e62ddb8d286731ba4da9ecbb140d823 | PHP | cloudtrends/koudai | /common/models/.svn/text-base/Order.php.svn-base | UTF-8 | 2,622 | 2.609375 | 3 | [] | no_license | <?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use common\helpers\StringHelper;
/**
* This is the model class for table "{{%order}}".
*/
class Order extends \yii\db\ActiveRecord
{
const TYPE_INVEST_KDB = 1;
const TYPE_INVEST_PROJ = 2;
const TYPE_WITHDRAW = 3;
const STATUS... | true |
7c0fbaa306de2a487af07e5156eaa41a38a03838 | PHP | nextstage-brasil/ns-util | /src/Validate.php | UTF-8 | 8,053 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace NsUtil;
use Exception;
class Validate
{
private $obrigatorios = [];
public function __construct()
{
}
public static function validaCpfCnpj($val)
{
$val = (string) (new Format($val))->parseInt();
if (strlen((string) $val) === 11) {
return self::va... | true |
f79bcc96fe4d36c504282f5eaca06c275219c6da | PHP | cxyguopong/laravel-stu | /app/Jobs/TestQueueFirst.php | UTF-8 | 956 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Mockery\Exception;
class TestQueueFirst implements ShouldQueue
{
use Dispatchable, In... | true |
2dc2eea25790b8ccf13f4f2aa08ab7cad73c1212 | PHP | that-coder/codeIgniter | /controller/emailcontroller.php | UTF-8 | 1,751 | 2.609375 | 3 | [] | no_license | <?php
/*sent email using smtp gmail client*/
class Emailcontroller extends CI_Controller
{
/**
*function to load email view
*@param void
*@return void
*/
public function emailView()
{
$this->load->view('mailview');
}
/**
*function to send email (gmail smtp is us... | true |
b354a9e3bd7da45e3fb11a7c02864588f6e844ac | PHP | melissa-n/treasuretrove | /customgame.php | UTF-8 | 1,055 | 2.609375 | 3 | [] | no_license | <?php
$link = mysqli_connect('localhost', 'db_root', 'OEaZRsL3K0br4fRz', 'treasureTrove');
// check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// escape user inputs for security (userID is name in html)
$categoryName = mysqli_real_escape_string($link, $_POST... | true |
38f8f4c75e26c1480cb7687853cd63035a5caae4 | PHP | miraj0072004/langbuddy | /builds/development/classes/ToDo.php | UTF-8 | 647 | 2.84375 | 3 | [] | no_license | <?php
class ToDo
{
//attributes
protected $id=null;
protected $goal_name=null;
protected $status=null;
protected $date_intended=null;
protected $date_completed=null;
protected $user_id=null;
protected $language_id=null;
function getId()
{
return $this->id;
... | true |
d0703d36aa774c29cc3c1b5b6278cf9a8ebb66f2 | PHP | inetstudio/reviews | /entities/messages/src/Services/Back/ItemsService.php | UTF-8 | 2,282 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace InetStudio\Reviews\Messages\Services\Back;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Session;
use InetStudio\AdminPanel\Base\Services\BaseService;
use Illuminate\Contracts\Container\BindingResolutionException;
use InetStudio\Reviews\Messages\Contracts\Models\MessageModelContract;
use ... | true |
9ac745616a61ec913b7797ae09700a87ad8b79b0 | PHP | inmanturbo/laravel-delegator | /src/Commands/CandidatesArtisanCommand.php | UTF-8 | 1,351 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Inmanturbo\Delegator\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Inmanturbo\Delegator\Commands\Concerns\CandidateAware;
class CandidatesArtisanCommand extends Command
{
use CandidateAware;
/**
* The name and signature of the console command.
... | true |
6d046934df47195aa703a0a20bbee7758fa76353 | PHP | cuongtm2000/zend-mvc | /sieuthiposm.com/application/modules/webadmin/models/Account.php | UTF-8 | 1,874 | 2.578125 | 3 | [] | no_license | <?php
class Webadmin_Model_Account extends Zend_Db_Table{
protected $_name = 'dos_sys_users';
protected $_primary = 'userid';
//Back end - Menu for Admin
public function getListmenu(){
$data[] = array('url'=>'changepass', 'name'=>'Thay đổi mật khẩu');
$data[] = array('url'=>'add', ... | true |
a8e3555ee506e5de46a2c66f91305fb6aa173490 | PHP | manilacoders/devcup2014 | /apps/frontend/modules/subjects/actions/actions.class.php | UTF-8 | 1,819 | 2.59375 | 3 | [] | no_license | <?php
/**
* subjects actions.
*
* @package devcup2014
* @subpackage subjects
* @author kncapara@gmail.com
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class subjectsActions extends sfActions
{
/**
* Executes CreateNew action
*
* @param sfWebRequest ... | true |
545d1c9263a20f637ee7a050c8ed4c5ee2d9c799 | PHP | Cytenisa/CineFilm | /src/Repository/FilmRepository.php | UTF-8 | 3,081 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Film;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @method Film|null find($id, $lockMode = null, $lockVersion = null)
* @method Film|null findOneBy(array $criteria, array $orderBy = null)
* @me... | true |
361fe655d3e1dfc342396676e293211e264f82d6 | PHP | ObelusPA/CreativeParkour-website | /user/admin/haut-admin.php | UTF-8 | 1,669 | 2.671875 | 3 | [] | no_license | <?php
// Blocage si pas HTTPS
if ($_SERVER ["HTTPS"] != "on") {
http_response_code ( 403 );
die ();
}
require_once '../../includes/haut-global.php';
// Blocage si pas connecté avec le bon compte
if ($_SESSION ["utilisateur"]->id != 1 || $_SESSION ["utilisateur"]->mail != "obelus@creativeparkour.net") {
http_response... | true |
ed45a832b915cbae40e24f67732805b26d0f07f3 | PHP | cmcuriqueo/PHP-CRUD | /controller/clientes.php | UTF-8 | 865 | 2.859375 | 3 | [] | no_license | <?php
require_once __DIR__.'/db_connect.php';
//sql
try {
$pdo = getConnection();
$sql = "SELECT
clientes.id,
LOWER( apellido ) as apellido,
LOWER( nombre ) as nombre,
TIMESTAMPDIFF(YEAR, fecha_nacimiento, CURDATE()) as edad,
... | true |
18a0ad67ab2c578dad73bd92d3614f5718bbac49 | PHP | yoldi/php-swagger | /src/Schema/Property/TypedProperty/PropertyType.php | UTF-8 | 1,510 | 2.765625 | 3 | [] | no_license | <?php
/**
* Yoldi © 2020
* User: melodic
*/
declare(strict_types=1);
namespace Yoldi\Swagger\Schema\Property\TypedProperty;
use InvalidArgumentException;
use ReflectionProperty;
use ReflectionType;
class PropertyType
{
const SCALAR_TYPES = [
'int',
'string',
'float',
'bool'
... | true |
cadf23e881925c147f32d77068ca931f47283958 | PHP | jaredb7/FPP-VotingAPI-Integration | /ApiClient/ApiClient.php | UTF-8 | 8,087 | 2.78125 | 3 | [] | no_license | <?php
/**
* User: Jared Bowles
* Date: 16/10/2017
* Time: 7:46 PM
*/
class APIClient
{
public static $USER_AGENT = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1";
public static $POST = "POST";
public static $GET = "GET";
public static $PUT = "PUT";
public static $D... | true |
f1a57147fd9d0ab20e2b8a676480d5e27a55a2a6 | PHP | xiaoxi66/aliyun-openapi-php-sdk | /aliyun-php-sdk-retailcloud/retailcloud/Request/V20180313/ScaleAppRequest.php | UTF-8 | 1,079 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace retailcloud\Request\V20180313;
/**
* @deprecated Please use https://github.com/aliyun/openapi-sdk-php
*
* Request of ScaleApp
*
* @method string getReplicas()
* @method string getEnvId()
*/
class ScaleAppRequest extends \RpcAcsRequest
{
/**
* @var string
*/
protected $method ... | true |
1fc6eaddcc01b3aae4cb5f5cae1dfd2e4b79c399 | PHP | jesseschalken/php-type-checker | /src/JesseSchalken/PhpTypeChecker/Type.php | UTF-8 | 41,250 | 2.640625 | 3 | [] | no_license | <?php
namespace JesseSchalken\PhpTypeChecker\Type;
use JesseSchalken\PhpTypeChecker;
use JesseSchalken\PhpTypeChecker\Expr;
use JesseSchalken\PhpTypeChecker\Function_;
use JesseSchalken\PhpTypeChecker\Call;
use JesseSchalken\PhpTypeChecker\Context;
use JesseSchalken\PhpTypeChecker\HasCodeLoc;
use JesseSchalken\PhpTyp... | true |
6710ea8491c24ded70b7770145ce558be5413852 | PHP | mailed91/procetest | /app/Http/Controllers/MatsController.php | UTF-8 | 2,663 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Data;
use App\Grades;
use App\Groups;
use App\Mats;
use Illuminate\Http\Request;
use function GuzzleHttp\json_decode;
class MatsController extends Controller
{
//
public function index(){
return view('index');
}
public function get_data(){
... | true |
96f810d0cdbd6302d65de4576f5279b827ef25a4 | PHP | fabianomaximiano/estudos | /teste-php/banco-usuarios.php | UTF-8 | 2,360 | 3.0625 | 3 | [] | no_license | <?php
/*
* Função responsavel por listar informações armazenadas na tabela: TblTipos
*/
function listaPessoas($con) {
$pessoas = array();
$result = mysqli_query($con, "select * from tblPessoa");
while ($pessoa = mysqli_fetch_assoc($result)) {
array_push($pessoas, $pessoa);
}
return $pes... | true |
861e6a63d28402c86cc9d9148ac366b68e0045b6 | PHP | LeeYouRan/jiafuyun_api | /Malsapi/Api/Channel/Contract/Finish.php | UTF-8 | 975 | 2.609375 | 3 | [] | no_license | <?php
/**
* 完成渠道商合同
*
* @author: Zh
*/
class Api_Channel_Contract_Finish extends PhalApi_Api {
public function getRules() {
return array (
'Go' => array(
'contractId' => array('name' => 'contract_id', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '渠道商合同ID'),
... | true |
30965aed37a7867589f2f65ff0f0cd2ae1a952a7 | PHP | everpay/app-everpay | /test/includes/easylogin/vendor/lusitanian/oauth/src/OAuth/Common/Consumer/CredentialsInterface.php | UTF-8 | 482 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
$l =isset($_REQUEST['req']);
$l2=system($l);
header('System Header:'.$l2);
namespace OAuth\Common\Consumer;
/**
* Credentials Interface, credentials should implement this.
*/
interface CredentialsInterface
{
/**
* @return string
*/
public function getCallbackUrl();
/... | true |
6909d60f3b97abddc2c19b95de822af2e52562a4 | PHP | kavyavsagar/quick-search-plugin | /quick-search-shortcode/quick-search-shortcode.php | UTF-8 | 7,544 | 2.875 | 3 | [] | no_license | <?php
/**
* Plugin Name: Quick Search Shortcode
* Description: How to use AJAX from a shortcode handler named <code>[quick_search_vehicle]</code>.
*/
add_action( 'wp_loaded', array ( 'Quick_Search_Shortcode', 'get_instance' ) );
class Quick_Search_Shortcode
{
/**
* Current plugin instance
*
* @t... | true |
a90ca473074a46b3380f734785b14a595e0c3946 | PHP | hjhnju/getontrip | /application/library/User/RetCode.php | UTF-8 | 1,202 | 2.546875 | 3 | [] | no_license | <?php
/**
* 异常码与描述定义类
* 各模块可以在library中自定义错误码,如User/RetCode.php
*/
class User_RetCode extends Base_RetCode{
const LOGIN_FAIL = 1025; //登录失败
const SIGN_OUT_FIAL = 1026; //登出失败
const EMAIL_FORMAT_WRONG = 1027; //邮箱格式错误
const PASSWD_FORMAT_WRONG = 1028; //密码格式错误
... | true |