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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
97ce9a9fd242437a85fdb213810238ec65327dbc | PHP | tom40/tom | /web/application/forms/AudioJobLinkCreate.php | UTF-8 | 4,107 | 2.53125 | 3 | [] | no_license | <?php
class Application_Form_AudioJobLinkCreate extends Zend_Form
{
/**
* Client ID
* @var int
*/
protected $_client;
/**
* Set client
*
* @param int $clientId Client ID
*
* @return void
*/
public function setClient( $clientId )
{
$clientMapper ... | true |
4ba32e5db3536f0c72ff758a09cf2cc095a1b200 | PHP | damir777/App-3 | /laravel/app/Http/Controllers/ToolsController.php | UTF-8 | 6,530 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\CustomValidator\Validator as CustomValidator;
use App\Tool;
use App\Repositories\ToolRepository;
use App\Repositories\ManufacturerRepository;
use App\Repositories\GeneralRepository;
class ToolsControl... | true |
1ac07541a4eed40076655b5ac06e729c8c80ae74 | PHP | Michal-B-Rybczynski/test1 | /CigaretteMachine/src/Machine/CigaretteCommandArgumentConverter.php | UTF-8 | 1,000 | 3.140625 | 3 | [] | no_license | <?php
namespace App\Machine;
use App\Machine\Builder\CommandArgumentConverterInterface;
use App\Machine\Util\MathManager;
/**
* Class CigaretteCommandArgumentConverter
* @package App\Machine
*/
class CigaretteCommandArgumentConverter implements CommandArgumentConverterInterface
{
/**
* @var MathManager
... | true |
4a8328c3bcac383fc59e086aaa6a5d64ac7ad588 | PHP | NovaXmu/app | /cms/action/api/Push.php | UTF-8 | 4,684 | 2.515625 | 3 | [] | no_license | <?php
/**
*
* @copyright Copyright (c) 2014 Yuri Zhang (http://www.yurilab.com)
* All rights reserved
*
* file: Push.php
* description: 推送平台Api
*
* @author Yuri
* @license Apache v2 License
*
**/
/**
* 推送面板 api
*/
class Action_Api_Push extends Action_Base
{
function __construct()... | true |
64415c9f71c8aa88b9a7d4de248e8269e4053607 | PHP | tejrajs/imapmailtest | /common/models/ImapDetail.php | UTF-8 | 1,141 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "{{%imap_detail}}".
*
* @property integer $id
* @property string $mail
* @property string $imapPath
* @property string $serverEncoding
* @property string $attachmentsDir
*/
class ImapDetail extends \yii\db\ActiveRecord
{
/**
... | true |
47e6c28428b7c3a2bdf0f0a6924ee6dce5532a38 | PHP | rogerelmacare/elmacare-api | /src/Context/Core/Module/Core/Application/End/EndCoreCommand.php | UTF-8 | 813 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Context\Core\Module\Core\Application\End;
final class EndCoreCommand
{
private $id;
private $startAt;
private $endAt;
private $numberOfLogins;
public function __construct(string $id, string $startAt, string $endAt, int $numberOfLogins)
{
... | true |
4f1fd2ee522c7406553851b0faf4e2de5d66ae3b | PHP | gocestojanov/PHP | /Hacker Ranks/5_ExtraLongFactorials_HackerRank.php | UTF-8 | 2,220 | 3.515625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<title>Extra Long Factorials - Hacker Rank Problem</title>
</head>
... | true |
30fc1bf66f20da51a2fa4666e0916ac71659d655 | PHP | edwinbuscabus/SemiFinal-Merchandise | /app/Http/Controllers/MerchandiseController.php | UTF-8 | 977 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Merchandise;
use Illuminate\Http\Request;
class MerchandiseController extends Controller
{
public function index(){
$m = Merchandise::orderBy('id')->get();
return view('merchandises.index', ['merchandises'=>$m]);
}
public function create(){
... | true |
6159362eeba949f45001e040f62e2e2503d98568 | PHP | dr4jw3r/ProjectWorking | /core/database/mappings/Mapping.php | UTF-8 | 1,156 | 3.21875 | 3 | [] | no_license | <?php
class Mapping{
public static function toObject($class_name, $array){
require_once(ENTITIES_DIR . $class_name . '.php');
if(array_key_exists('id', $array)){
$object = new $class_name;
foreach($array as $key => $value){
$object->__set($key, $value);
}
return $object;
}
else{
$list = ... | true |
127bf6d5c0a10198cf4603fb8bb9c2fbfe9008f4 | PHP | bash-stack/repman | /src/Message/User/RefreshOAuthToken.php | UTF-8 | 482 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"ISC"
] | permissive | <?php
declare(strict_types=1);
namespace Buddy\Repman\Message\User;
final class RefreshOAuthToken
{
private string $userId;
private string $tokenType;
public function __construct(string $userId, string $tokenType)
{
$this->userId = $userId;
$this->tokenType = $tokenType;
}
p... | true |
0366aa1a09d1618828781226c55431483d7681eb | PHP | akki47kishore/employeemanagement | /day3/lab3/pgm7.php | UTF-8 | 203 | 2.75 | 3 | [] | no_license | <?php
$date1=date_create("2014-04-30 08:00:00");
$date2=date_create("2017-07-17 07:00:00");
$diff=date_diff($date1,$date2);
echo $diff->format("Month: %m <br> days: %d <br>Hour: %h <br>Minutes:%m.");
?>
| true |
8a5efb22f62fa11aaffed5b1db34b6214d6ca781 | PHP | RazerGlass/Bitcoin-Exchange | /application/controllers/help.php | UTF-8 | 2,512 | 2.53125 | 3 | [] | no_license | <?php
/**
* Class Home
*
* Please note:
* Don't use the same name for class and method, as this might trigger an (unintended) __construct of the class.
* This is really weird behaviour, but documented here: http://php.net/manual/en/language.oop5.decon.php
*
*/
class Help extends Controller
{
/**
* PAGE... | true |
23e2efb800f88e5038134bb3e8e4e9b01fa22326 | PHP | Ulysse28/Minichat-PHP | /minichat.php | UTF-8 | 2,414 | 2.53125 | 3 | [] | no_license | <!--
minichat.php file
By Ulysse Valdenaire
04/10/2021
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minichat</title>
<link rel="stylesheet" href... | true |
e8e50570a2cd79a33e6060afed0886f2bf3a62d1 | PHP | iCodiceLLC/pintas-USCAbuseLawyers.com | /db/counter.php | UTF-8 | 1,567 | 2.734375 | 3 | [] | no_license | <?php
session_start();
$dataFile = "./db/data.json";
$dataArray = array();
date_default_timezone_set('America/Chicago');
$date = date('Y/m/d');
$time = date("h:i:sa");
$ip = $_SERVER['REMOTE_ADDR'];
if(isset($_GET['utm_source'])) {
$_SESSION['utmSource'] = $_GET['utm_source'];
} else {
$_SESSION['utmSo... | true |
951943b03f0756b1523cab06464dedef0ec5afb5 | PHP | dynamic11/IEEEPOS | /app/Timetable.php | UTF-8 | 571 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Timetable extends Model
{
protected $table = 'timetable';
public $timestamps = false;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'volunteerID1', 'volunteerID2', 'volunte... | true |
741c8fd4d6c073bfeaf7b8d3baa9b1c3efc2407f | PHP | Adritrader/08-adrian-symfony | /src/Entity/Producto.php | UTF-8 | 4,565 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ProductoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=ProductoRepository::class)
*/
cl... | true |
77683c137f62ec369c5a0d9aa5e3b024b8cf112c | PHP | divyasunkara12/multiuserloginsystem | /index.php | UTF-8 | 3,151 | 2.59375 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['username'])) {
$_SESSION['msg'] = "You must register first";
header('location: register.php');
}
if (isset($_GET['sendmail'])) {
session_destroy();
unset($_SESSION['username']);
header("location: import.php");
}
if (isset($_GET['logout'])) {
... | true |
9fb3c95ebb6dad1ebd4e93e70e231ee666c18b5a | PHP | visor/nano | /library/TestUtils/Mixin/Files.php | UTF-8 | 1,995 | 2.625 | 3 | [] | no_license | <?php
namespace Nano\TestUtils\Mixin;
class Files extends \Nano\TestUtils\Mixin {
const EMPTY_FILE = 'empty';
/**
* @return string
* @param \Nano\TestUtils\TestCase $test
* @param string $name
* @param string|null $anotherDir
*/
public function get(\Nano\TestUtils\TestCase $test, $name, $anotherDir = n... | true |
0c99bfda67bee9e8d3b3445d3b00f143b1d0ae34 | PHP | amitk1990/Music-Online-Website | /DB-Final-Project/Script/editpopulate.php | UTF-8 | 1,079 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
session_start();
$uid = $_SESSION["uid"];
//$uname = $_GET["genre"];
//echo $uname;
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "DbFinal";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error)
{
die("Connection failed: " . $conn->co... | true |
f51ab8eac9e9bca8c731d77c32d6672053696741 | PHP | EasyLinux/LesGumes | /www/_Old/acces_contrat_tisane.php | UTF-8 | 3,489 | 2.75 | 3 | [] | no_license | <?php
function VoirContratTisane ( $id) {
mysqli_connect(hote, login, mot_passe_sql); // Connexion à MySQL
mysqli_select_db(base_de_donnees); // Sélection de la base
$table= 'amap_tisanes';
$question="SELECT * FROM $table WHERE id='".$id."'";
$reponse = mysqli_query($question) or die(mysqli_error());
$donn... | true |
3a4acdc9d3ad169779f6c13d52ac290945636897 | PHP | duziem/php-ecommerce-app | /database/wishlist.php | UTF-8 | 1,811 | 3.09375 | 3 | [] | no_license | <?php
class Wishlist
{
public $db;
function __construct($db)
{
$this->db = $db;
}
//get cart row based on the user id
public function getDataByUserId($userId, $table = "wishlist")
{
$query = "SELECT * FROM {$table} WHERE `user_id`= {$userId}";
$result = $this->db->... | true |
1b65b99db639a8792d570330180ad4b4669f481e | PHP | svenax/Bolt | /src/structures/IStructure.php | UTF-8 | 228 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Bolt\structures;
/**
* interface IStructure
*
* @author Michal Stefanak
* @link https://github.com/neo4j-php/Bolt
* @package Bolt\structures
*/
interface IStructure
{
public function __toString () : string;
}
| true |
82b73d4754cb19f327181c728253f626aa348d2c | PHP | micflan/CleanWiki | /index.php | UTF-8 | 1,643 | 2.640625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require 'vendor/autoload.php';
use Sunra\PhpSimple\HtmlDomParser;
if ( ! isset($_GET['wiki'])) {
die('no wiki page specified');
}
$wiki_location = $_GET['wiki'];
if ( ! filter_var($wiki_location, FILTER_VALIDATE_URL)){
die('invalid wiki page speci... | true |
2d9ada2fd3a6554485ba79b85621b410a168aa6a | PHP | lapia/lapia | /Adminpanel/sqlconnect.php | UTF-8 | 627 | 2.890625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class SqlConnect {
private $host;
private $user;
private $password;
private $db;
private $link;
public function SqlConnect($ho,$us,$pas,$d)
{
$this->host=$ho;
$this->user=$us;
$this->password=$pas;
$this->db=$d;
}
public function connectToDb()
{
$this->link= mysql_connect($this->host,$this-... | true |
3fb2bef737b4f5d4a6108304063c7883522397e5 | PHP | frontend-3/skel-nodos | /backend/module/Florence2/src/Listener/CreateElementCheckbox.php | UTF-8 | 610 | 2.5625 | 3 | [] | no_license | <?php
/**
* This file is part of Florence2 Zend Framework 2 module.
*/
namespace Florence2\Listener;
/**
* Create Element Checkbox Listener
*
* @package Florence2
* @version v1.0.0
* @author Jaime Wong <jaime.wong@nodosdigital.pe>
*/
class CreateElementCheckbox
{
/**
* Post
*
* @return vo... | true |
d29ac961d5f1207d2fb74de1a6e4ea89058b2981 | PHP | MichaelEJulian/DevCodingTest2 | /test4.php | UTF-8 | 1,095 | 2.828125 | 3 | [] | no_license | function processTransaction() {
$db = Database::getInstance();
$data = $db->sql('SELECT * FROM PayrollRecords WHERE Status = %s', [‘Pending']);
foreach ($data as $item) {
$transaction = Transaction::getStatus($item[‘transactionId’]);
if ($transaction[‘processed’]) {
$rec... | true |
baddc2ee865e6716de46427746f7574357eb1047 | PHP | slavensaka/diplomski | /database/migrations/2015_03_09_133650_create_tests_table.php | UTF-8 | 1,010 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTestsTable extends Migration {
public function up()
{
Schema::create('tests', function(Blueprint $table) {
$table->increments('id');
$table->string('test_name');
$table->string('intro');
$table->... | true |
e8eb710c01ec7bffe2e2271d5845bc606da1486d | PHP | SirPeace/lc-voting | /database/factories/StatusFactory.php | UTF-8 | 1,026 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Status;
use Illuminate\Database\Eloquent\Factories\Factory;
class StatusFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Status::class;
/**
* Define the model's... | true |
937e946770ba3a91cbe8073dee21ecdb49ed823a | PHP | StevenRojas/microservices-base | /services/admin/app/Model/Store.php | UTF-8 | 922 | 2.625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* Store model
* @author: Steven Rojas <steven.rojas@gmail.com>
*/
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Store extends Model {
use \Illuminate\Database\Eloquent\SoftDeletes;
protected $fillable = ["name", "number", "alt_id", "classifications", "phone", "address1", "... | true |
adbd4009cd7b57e080dfe95789bd89f974542a38 | PHP | marcellopato/eduxe | /app/Http/Controllers/SchoolController.php | UTF-8 | 4,228 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\School;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class SchoolController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
... | true |
2e6461d3a05b05c81942a1f7511a6f3f178a2792 | PHP | steve1611922/Week5-Lab1 | /myPHPFunctions.php | UTF-8 | 627 | 3.3125 | 3 | [] | no_license | <! DOCTYPE html >
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<p>
<?php
// php code goes here
function printCookieSession()
{
// list all the cookies and session key value pairs
echo "<br>";
echo " ** All the cookies **<br>";
... | true |
87b4c120002f22af86fdec7f1f1538f457c0a2cb | PHP | JuanjeLopez/test-flutter | /back/app/Http/Controllers/OrdersController.php | UTF-8 | 1,443 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Order;
use App\Models\Pedido;
use Illuminate\Http\Request;
class OrdersController extends Controller
{
public function addorder(Request $request){
$order = new Order();
$jcart = $request->all();
$order->order = $jcart;
$order->save();
$pedido ... | true |
067c61551a659ae7e451ef62551672bea6d0facf | PHP | Aldair141/fundamentos-php | /archivos_content.php | UTF-8 | 1,142 | 3.265625 | 3 | [] | no_license | <?php
//Leer el contenido del archivo
$nombreArchivo = "array.php";
$contenido = file_get_contents($nombreArchivo);
echo "<textarea>$contenido</textarea>";
echo "<hr>";
//Otra forma
//Abrir el archivo
$manejaarchivo = fopen($nombreArchivo, "r");
$tamanioArchivo = filesize($nombreArchivo);
//Leer el contenido
$conten... | true |
eeacd6dedeebbb3c6ca2a11425ceaebcc62b5722 | PHP | Scarbous/mr_geo | /Classes/Domain/Model/GeoTrait.php | UTF-8 | 776 | 2.921875 | 3 | [] | no_license | <?php
namespace Scarbous\MrGeo\Domain\Model;
use \Scarbous\MrGeo\Utility\GeoUtility;
trait GeoTrait
{
/**
* @var string
*/
protected $geo;
/**
* @return string
*/
public function getGeo(): string
{
return $this->geo;
}
/**
* @return string
*/
p... | true |
921f4bd8ecc1c533cf2c721fc6f9587d57ce0071 | PHP | sumonkarmakar/KarmickPHP | /signin.php | UTF-8 | 2,228 | 2.890625 | 3 | [] | no_license | <?php
include "db_config.php";
//session_start();
$error = array();
if(is_login()){
header("Location: dashboard.php");
exit();
}
if($_SERVER['REQUEST_METHOD']=='POST' && !empty($_POST['actioned']) && $_POST['actioned']=='signin'){
if(!empty($_POST['email']) && !empty($_POST['password'])){
$emai... | true |
d1061061db606f0081246a2a04b8625f3c9142bc | PHP | Linyugui/music-php-laravel | /app/Models/UserModel.php | UTF-8 | 780 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UserModel extends Model
{
protected $table = 'user';
protected $fillable = [
'openid',
'avatarUrl',
'city',
'country',
'nickName',
'province',
];
public static function addUser... | true |
22ab517a161a05e9e0805fa3f52cfbe575e3fa21 | PHP | egramez/Hotel-reservation | /app/User.php | UTF-8 | 1,511 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Mail\TwoFactorMail;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Mail;
class User extends Authenticatable implements MustVerifyEmail
{
use Notifiable;
... | true |
1f431f69a5185fbfb4bcb792e7e2a3027c6b7d1d | PHP | Idrinth/phpunit-test-generator | /test/Factory/ClassDescriptorFactoryTest.php | UTF-8 | 5,503 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace De\Idrinth\TestGenerator\Test\Classes;
use De\Idrinth\TestGenerator\Factory\ClassDescriptorFactory;
use De\Idrinth\TestGenerator\Factory\MethodFactory;
use De\Idrinth\TestGenerator\Service\TypeResolver;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PHPUnit\Framework\TestCase... | true |
9472b9863d34e3eee0a507356fcfcf827330f423 | PHP | fan-tak-sato/programming-exercises | /php/oop/arrayobject/sample1.php | UTF-8 | 147 | 2.96875 | 3 | [] | no_license | <?php
$array = array('one', 'two', 'three');
$arrayObj = new ArrayObject($array);
var_dump( ($array[0] == $arrayObj[0]) );
// Output: true
| true |
7a69de88e940f8fa69728bd26e0221bf12bb665f | PHP | Marcos1305/Curso-de-Laravel-Relationships | /app/Model/Country.php | UTF-8 | 885 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use App\Model\Location;
class Country extends Model
{
protected $fillable = ['name'];
public function location()
{
return $this->hasOne(Location::class); //Caso Tennha seguido todos os padrões do Laravel
/*
Ca... | true |
6672d9fe9841fa7f4a7a37fd7f9eb39b29eb2bc5 | PHP | YassineAlalou/Covoiturage | /service/VilleTrajetService.php | UTF-8 | 2,365 | 2.796875 | 3 | [] | no_license | <?php
//include_once RACINE . '/classes/VilleTrajet.php';
include_once './racine.php';
include_once RACINE.'/classes/VilleTrajet.php';
include_once RACINE.'/conx/connexion.php';
include_once RACINE.'/dao/Idao.php';
class VilleTrajetService implements Idao{
private $con;
function __construct(){
$this->con = new C... | true |
3f3131ad4f1e81b6aaee5fbe55bbf54df1e28df3 | PHP | coder-xsj/hello_laravel | /app/Http/Controllers/SessionsController.php | UTF-8 | 3,045 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Auth;
use Cache;
use Illuminate\Http\Request;
use Gregwar\Captcha\CaptchaBuilder;
use Gregwar\Captcha\PhraseBuilder;
class SessionsController extends Controller
{
//
public function __construct(){
// 让未登录用户只能访问登录和注册页面
$this->middleware('guest', [
... | true |
bb12bdc58a096841b7e7f0c909fa1271e8a59886 | PHP | RafaelSAlmeida/TCC | /frm/ManagerCasoUso.php | UTF-8 | 941 | 2.796875 | 3 | [] | no_license | <?php
include '../bd/BdCasoUso.php';
if(@$_POST['gravar']){
$metodo = new ManagerCasoUso();
$metodo->gravar($_POST);
}else if(@$_POST['editar']){
$metodo = new ManagerCasoUso();
$metodo->editar($_POST);
}else if(@$_POST['excluir']){
$metodo = new ManagerCasoUso();
$metodo->excluir($_POST);
}
class ManagerCasoUs... | true |
73596ae7bf134f7dd4003dca1601f3d82c3eaa45 | PHP | Vanessa30/ProjetoWeb | /php/mysql_insert.php | UTF-8 | 472 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title> ... </title>
</head>
<meta charset="utf-8">
<body>
<?php
include 'test.php';
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
echo "Nome: $name <br>";
echo "E-mail: $email <br>";
echo "Mensagem: $message <br>";
mysqli_query ($c... | true |
ef06a704fd5effec1e14744990f8693ac07e97f2 | PHP | babenkoivan/elastic-mate | /src/Core/Settings/TokenFilters/CjkBigramTokenFilter.php | UTF-8 | 1,216 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace BabenkoIvan\ElasticMate\Core\Settings\TokenFilters;
use BabenkoIvan\ElasticMate\Core\Contracts\Settings\TokenFilter;
use BabenkoIvan\ElasticMate\Core\Settings\Traits\CanOutputUnigrams;
use Illuminate\Support\Collection;
final class CjkBigramTokenFilter extends AbstractTokenFi... | true |
d0aebfdf7b050739a6d5b8aa48296ec6c894ce0b | PHP | ljwaheng/Exp | /Algorithm/sort/SingleLInkList.php | UTF-8 | 1,614 | 3.234375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: L
* Date: 2018-9-28
* Time: 22:03
*/
class SingleLinkList
{
private $head;//默认取head为0位
public $len;
/**
* singelLinkList constructor.
* @param $head
*/
public function __construct()
{
$this->head = new Node();
$this->l... | true |
9f50e5b12e9edb01bd5f6035632e0008b06c4553 | PHP | Drunken-Dragon/silex-lp | /src/Controller/LoginController.php | UTF-8 | 1,350 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Controller;
use Form\LoginRequest;
use Symfony\Component\HttpFoundation\Request;
class LoginController extends AbstractController
{
/**
* @param Request $request
* @return mixed
*/
public function indexAction(Request $request)
{
$data = new ... | true |
0d8f1f92e02556dc3cc37d9178cc28ce1cf8a8a6 | PHP | GroopyMusic/GroopyMusic | /src/XBundle/Entity/Product.php | UTF-8 | 11,337 | 2.59375 | 3 | [] | no_license | <?php
namespace XBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use XBundle\Entity\Project;
/**
* Product
*
* @ORM\... | true |
d12e199b31f5d46e5c5c47c411dc13ffd46445f7 | PHP | taldaitz/FormationPhpInter | /Exo04/index.php | UTF-8 | 592 | 2.953125 | 3 | [] | no_license | <?php
use formes\Carre;
use formes\Cercle;
use formes\Forme;
use formes\Rectangle;
use formes\Triangle;
function chargerClasses($classe) {
include $classe . '.php';
}
spl_autoload_register('chargerClasses');
$rectangle = new Rectangle(500, 300);
$cercle = new Cercle(500);
$triangle = new Triangle(500, 300);
... | true |
9a24d385e5505774e23e746b3b2fe3b479c0e06b | PHP | CodingAvenue/codestop-proof-lib-javascript | /src/SelectorParser/Rule/AttributeRule.php | UTF-8 | 3,368 | 2.90625 | 3 | [] | no_license | <?php
namespace CodeStop\Proof\SelectorParser\Rule;
use CodeStop\Proof\SelectorParser\Token;
use CodeStop\Proof\SelectorParser\TokenStream;
use CodeStop\Proof\SelectorParser\Rule\RuleInterface;
class AttributeRule implements RuleInterface
{
public function startToken(Token $token)
{
return $token->ge... | true |
acbd9a3c316c05986976b173b4f882f28c2d21e6 | PHP | luiscarlosjunior/aulas-graduacao | /programming/php/05-pdf/mpdf-8.0.11/mpdf/src/Tag/Tag.php | UTF-8 | 2,210 | 2.71875 | 3 | [
"MIT",
"GPL-2.0-only"
] | permissive | <?php
namespace Mpdf\Tag;
use Mpdf\Strict;
use Mpdf\Cache;
use Mpdf\Color\ColorConverter;
use Mpdf\CssManager;
use Mpdf\Form;
use Mpdf\Image\ImageProcessor;
use Mpdf\Language\LanguageToFontInterface;
use Mpdf\Mpdf;
use Mpdf\Otl;
use Mpdf\SizeConverter;
use Mpdf\TableOfContents;
abstract class Tag
{
use Strict;
... | true |
794a5ca0e805d216fd97830ee42ad87b88b4074a | PHP | lextel/evolution | /fuel/app/classes/controller/frontend.php | UTF-8 | 792 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Controller_Frontend extends Controller_Template {
/**
* @var auth 实例对象
*/
public $auth;
/**
* @var 当前用户信息
*/
public $current_user;
/**
* 获取当前登陆信息并赋值到view层
*/
public function before() {
parent::before();
$this->auth = Auth::instance('M... | true |
f984668e83d97d8667911afd8301fcacb7fb2132 | PHP | tung-github/test-component | /plugins/tung/booking/updates/create_room_types_table.php | UTF-8 | 617 | 2.546875 | 3 | [] | no_license | <?php namespace Tung\Booking\Updates;
use Schema;
use October\Rain\Database\Schema\Blueprint;
use October\Rain\Database\Updates\Migration;
class CreateRoomTypesTable extends Migration
{
public function up()
{
Schema::create('tung_booking_room_types', function (Blueprint $table) {
$table->e... | true |
d1c2ce91075539577c8e80b8315410fd30efc575 | PHP | hisanhunais/EasyFarmFinal | /view/farmer/processOrder.php | UTF-8 | 1,760 | 2.53125 | 3 | [] | no_license | <?php
require '../../controller/connect.php';
if(!empty($_POST))
{
$output = '';
$message = '';
$query = '';
if(isset($_POST['completedata']))
{
$query = "UPDATE ordertable SET status = 'Completed' WHERE Ord_No = '".$_POST['completedata']."'";
}
if(isset($_POST['proceeddata']))
{
$query = ... | true |
40a395c358483c77cf8d11984aa0eed95f360ce2 | PHP | powmedia/powJSONActions | /lib/powJSONActions.php | UTF-8 | 2,527 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* powJSONActions
*
* Provides methods for responding to a request with JSON
*
* @author Charles Davison
* @version 1.0
*/
class powJSONActions extends sfActions
{
/**
* Respond in JSON when requested via Ajax or as plain text when requested directly.
*
* If the web debug t... | true |
18ee29282957158fd984e7f43e0bc3eeeca78188 | PHP | duweilinr/ron_project | /Units/U_Friction/Friction_3/Friction_3_solver.php | UTF-8 | 763 | 2.859375 | 3 | [] | no_license | <?php
// File: Friction_3_solver.php rev. 08/20/2017 rcr
// generate solution from code for this instance (no 'fofx' answers)
function code_solver($ivvallist) {
//$dbgtxt= "ivvallist: ".$ivvallist[0].", ".$ivvallist[1];
//file_put_contents('./debug_ivvallist.txt',$dbgtxt);
// solve the code part of the equat... | true |
9f2b7e55c4f90bad3b07d6f5470dca783b5e3029 | PHP | Lhudram/NuitInfo | /sith/classes/EvenementManager.class.php | UTF-8 | 2,409 | 2.984375 | 3 | [] | no_license | <?php
class EvenementManager
{
private $db;
public function __construct($db)
{
$this->db = $db;
}
public function add($evenement)
{
$reqSQL = 'INSERT INTO accident VALUES (:idevenement, :nom_event, :desc_event, :date_event, :idlieu)';
$reqPreparee = $this->db-... | true |
55f7ec76c4e0dd361b7e64586ad378b8cc1991d6 | PHP | dbiagi/LexikMonologBrowserBundle | /Command/SchemaUpdateCommand.php | UTF-8 | 2,665 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Lexik\Bundle\MonologBrowserBundle\Command;
use Lexik\Bundle\MonologBrowserBundle\Model\SchemaBuilder;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Consol... | true |
6ad817388b841fb4cf69028315850f9fa7921af9 | PHP | ryanwhowe/stfc | /symfony/src/Command/Load/LoaderCommand.php | UTF-8 | 2,806 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Command\Load;
use Doctrine\DBAL\Driver\Exception;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Con... | true |
fdf4a0ce44f158456459bc2552d8616c422c2ee4 | PHP | sitkoru/yandex-direct-api | /src/services/ads/models/TextAd.php | UTF-8 | 2,768 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace directapi\services\ads\models;
use directapi\components\constraints as DirectApiAssert;
use directapi\components\interfaces\ICallbackValidation;
use directapi\components\Model;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
ab... | true |
84740ca6f7646ac553479f39696f61fd90e0e19f | PHP | lsandrade/cakephp3-backend | /src/Template/Element/Menu/menu.ctp | UTF-8 | 585 | 2.859375 | 3 | [] | no_license | <?php
/**
* Menu Element
*
* Renders a simple menu structure.
*/
$menu = isset($menu) ? $menu : false;
$class = isset($class) ? $class : '';
$id = isset($id) ? $id : null;
$wrapper = isset($wrapper) ? $wrapper : 'ul';
//$levels = isset($levels) ? $levels : -1;
debug($class);
debug($wrapp... | true |
ceef72fce8ddb4849a3240aaa7d62325488d4a40 | PHP | yamotuki/design_pattern | /Visitor_pattern/Element.php | UTF-8 | 102 | 2.84375 | 3 | [] | no_license | <?php
namespace Visitor_pattern;
interface Element
{
public function accept(Visitor $visitor);
} | true |
9eaaff6e58ca9f2c5f3acf3e5421219107db8122 | PHP | xp-forge/stomp | /src/test/php/peer/stomp/unittest/TransactionTest.class.php | UTF-8 | 2,341 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php namespace peer\stomp\unittest;
use lang\IllegalStateException;
use peer\stomp\Transaction;
use test\{Assert, Expect, Test};
class TransactionTest {
#[Test]
public function create() {
$t= new Transaction();
Assert::true(0 < strlen($t->getName()));
}
#[Test]
public function accepts_transaction... | true |
f065a83e24c56c5d9c9c49f43340ea1dd3d7e446 | PHP | CharuniKaushalya/Database-Project | /src/ApplicantBundle/Entity/Role.php | UTF-8 | 2,057 | 2.8125 | 3 | [] | no_license | <?php
namespace ApplicantBundle\Entity;
/**
* Role
*/
class Role
{
/**
* @var string
*/
private $role;
/**
* @var string
*/
private $description;
/**
* @var integer
*/
private $id;
/**
* @var \Doctrine\Common\Collections\Collection
*/
privat... | true |
23c1cb9aab75bcde6fca0462cf90930159844647 | PHP | criscmaia/php-slack-tutorial | /slack-integration/index.php | UTF-8 | 5,358 | 3.03125 | 3 | [] | no_license | <?php
/**
* A simple example script for calling the Slack API.
*
* This example saves the access token and related information in a simple
* text file in the same directory with the script. Please notice that this
* approach is for demonstration purposes only and not suited for real
* applications.
*
* @author ... | true |
330309a454c449951ea812e1fdb54988ccb83488 | PHP | LaravelFreelancerNL/laravel-arangodb | /src/Schema/Concerns/UsesBlueprints.php | UTF-8 | 1,767 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace LaravelFreelancerNL\Aranguent\Schema\Concerns;
use Closure;
use LaravelFreelancerNL\Aranguent\Schema\Blueprint;
trait UsesBlueprints
{
/**
* Create a new command set with a Closure.
*
* @param string $collection
* @param Closure|null $callback
... | true |
59925f4cc26fcd730b3bc46ac78383c684db33ed | PHP | shopware/SwagPayPal | /src/Pos/Resource/SubscriptionResource.php | UTF-8 | 2,313 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Swag\PayPal\Pos\Resource;
use Swag\PayPal\Pos\Api\PosBaseURL;
use Swag\PayPal\Pos\Api\PosRequestUri;
use... | true |
3ba2c83329a632c32c9d3ea49c445a08fef8bd54 | PHP | StageA2DFInformatique/StageA2DFInformatique | /cAccueil.php | UTF-8 | 2,280 | 2.53125 | 3 | [] | no_license | <?php
/**
* Contrôleur : gestion des Syntheses de chaque mois de l'année
*/
use modele\dao\SyntheseDAO;
use modele\metier\Synthese;
use modele\dao\Bdd;
require_once __DIR__ . '/include/autoload.php';
Bdd::connecter();
$repInclude = './include/';
require($repInclude . "_init.inc.php");
// 1ère étape (do... | true |
60f9d5c8a475b6004368e7e23e05eb7d772df69d | PHP | KDRdev/ImagePost | /app/setup/db.php | UTF-8 | 971 | 2.546875 | 3 | [] | no_license | <?php
require_once dirname(dirname(__FILE__)) . '/config/config.php';
require_once dirname(dirname(__FILE__)) . '/libraries/Database.php';
$db = new Database;
$posts = "
CREATE TABLE `posts1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
... | true |
a66aa912fd45162ab730e3b5a79ceb64218b8efc | PHP | bfoster1/402maps_Project | /402maps/contentFormat.php | UTF-8 | 1,091 | 3.09375 | 3 | [] | no_license | <?php
//handles contents and renders the file
class ContentFormat{
private static $viewer_content;
private static $table_headers;
private static $table_header_cells;
private static $table_rows;
function get_table_content($content, $headers)
{
$this->format_table($content, $headers);
return self:: $... | true |
b70d3d756d22a72eae385397abe9df2109c2b28d | PHP | sky1core/synchole | /app/GitHubApp/GitHubAppBase.php | UTF-8 | 421 | 2.796875 | 3 | [] | no_license | <?php
namespace App\GitHubApp;
class GitHubAppBase
{
protected $app_id;
protected $username;
public function __construct()
{
$this->app_id = config('synchole.github.app_id');
$this->username = config('synchole.github.username');
}
public function app_id()
{
retu... | true |
10fedbdf47301711d322e8286dfb80b5cf9b9069 | PHP | kebrahim/rotiss2 | /util/auctionManager.php | UTF-8 | 1,139 | 3 | 3 | [] | no_license | <?php
require_once 'commonUtil.php';
CommonUtil::requireFileIn('/../dao/', 'auctionDao.php');
/**
* Handles utility methods for auction objects.
*/
class AuctionManager {
/**
* Displays an auction year selection box inside a single span12 cell with the specified year
* selected.
*/
public static funct... | true |
f0e4da8fe6e6e2832081c0a6aa3672469c07c90c | PHP | udioz/picrun | /app/Console/Commands/TranslateDictionary.php | UTF-8 | 3,534 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Dictionary;
use DB;
use Illuminate\Support\Facades\Log;
use LanguageDetection\Language;
class TranslateDictionary extends Command
{
protected $signature = 'picrun:translate-dictionary {to_language_code} {start_id=1}';
prot... | true |
aeb0300c9bcd11b872207db69d65b854d3090d3a | PHP | nar3nce/E-commerce-project | /mkdir.php | UTF-8 | 1,521 | 2.71875 | 3 | [] | no_license |
<?php
if(isset($_POST['Submit']))
{
$u = $_POST['textfield'];
if(file_exists($u))
{
echo "sorry file already exists";
}
else
{
$m = mkdir($u);
}
}
if(isset($_POST['Submit2']))
{
$u = $_POST['textfield2'];
if(!file_exists($u))
{
echo "no files found";
}
else
{
rmdir($u);
}
}
?>
<style type="text/css"... | true |
86355a583547c47d108c2372e286f0e2333fa9be | PHP | marcellinamichie291/API | /src/Kami/WorkerBundle/Security/WorkerUserProvider.php | UTF-8 | 1,455 | 2.59375 | 3 | [] | no_license | <?php
namespace Kami\WorkerBundle\Security;
use Kami\WorkerBundle\Entity\Worker;
use Symfony\Bridge\Doctrine\RegistryInterface;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\User\User... | true |
57d3c588826e813d2c758d29a39473f0103b6026 | PHP | inkognitro/php-backend-symfony-boilerplate | /src/Packages/Common/Application/Utilities/Validation/Rules/RequiredUuidRule.php | UTF-8 | 1,097 | 2.8125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Packages\Common\Application\Utilities\Validation\Rules;
use App\Packages\Common\Application\Utilities\Validation\Messages\Message;
use App\Packages\Common\Application\Utilities\Validation\Messages\MustBeAStringMessage;
use App\Packages\Common\Application\Utilities\Validati... | true |
95340fbd8c0bd429f9bd77fe14345cb091a81a52 | PHP | hi-noikiy/mini-programe-framework | /addons/longbing_card/core/extend/tencentcloud/vendor/guzzle/guzzle/tests/Guzzle/Tests/Http/Message/Header/LinkTest.php | UTF-8 | 1,620 | 2.890625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php namespace Guzzle\Tests\Http\Message\Header;
class LinkTest extends \Guzzle\Tests\GuzzleTestCase
{
public function testParsesLinks()
{
$link = new \Guzzle\Http\Message\Header\Link("Link", "<http:/.../front.jpeg>; rel=front; type=\"image/jpeg\", <http://.../back.jpeg>; rel=back; type=\"image/jpeg\", <http://... | true |
e3222f8ad21441f3c3875366f9022753bb16e3e6 | PHP | cheef/mfrails | /core/active_record.php | UTF-8 | 1,911 | 3.203125 | 3 | [] | no_license | <?php
class ActiveRecord extends AbstractClass {
static $table_name = NULL;
static public $db = NULL;
static public $result = NULL;
public $id;
public function ActiveRecord($data = ""){
if (!empty($data))
foreach ($data as $field => $value){
$field = strtolower(preg_replace("/(\w)([A-Z]... | true |
e074f262382efd4920090aabee8c831033629a30 | PHP | mzabsky/webdrafter | /vendor/Raven/TransactionStack.php | UTF-8 | 923 | 2.84375 | 3 | [] | permissive | <?php
/*
* This file is part of Raven.
*
* (c) Sentry Team
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
class Raven_TransactionStack
{
public function __construct()
{
$this->stack = array();
}
public fu... | true |
7f33add252f3ad227fdbee98ee87d883f3aaa9eb | PHP | dhadzhiew/clippings-invoices | /src/Util/Parser/FileDataSourceInterface.php | UTF-8 | 208 | 2.53125 | 3 | [] | no_license | <?php
namespace Clippings\Component\Calculator\Util\Parser;
interface FileDataSourceInterface extends DataSourceInterface
{
public function open(string $filePath);
public function close(): void;
}
| true |
a995372e942a15109eaa4e97ea4638f12d298684 | PHP | fadhliismail/databaseProject | /php files/test/test.php | UTF-8 | 3,385 | 2.796875 | 3 | [] | no_license | <?php
//student any error
error_reporting(E_ALL); ini_set('display_errors', 1); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
//connect to database
include 'db_connect.php';
/*Count number of existing groups*/
$querygroup = "SELECT COUNT(DISTINCT GroupNo) AS `countgroup` FROM student WHE... | true |
a44874febcb5baa0a555219a84ca15d95bd3fb2f | PHP | fademar/barmiton | /app/Model/Traductions/TraductionsModel.php | UTF-8 | 513 | 2.5625 | 3 | [] | no_license | <?php
namespace Model\Traductions;
class TraductionsModel extends \W\Model\Model
{
public function getTrad($text) {
$textPlain = rawurlencode(htmlentities($text, ENT_QUOTES));
$urlgoogle = 'https://www.googleapis.com/language/translate/v2?key=AIzaSyBmL7IRhjcpPBeqg3h2SYWZywj02qr3X94&q='. $textPlain . '&... | true |
b6f9a7653845c7d5fbbe21d4eb3b5bfd01e93f2a | PHP | ScottyXIII/Penguin-framework | /database/active.php | UTF-8 | 3,518 | 3.21875 | 3 | [] | no_license | <?php
Abstract class Active
{
/**
*
* Holds an array of our grammer components used to build up our query strings.
*
*/
private $grammer_components = array( 'select',
'from',
'columns',
'where',
'columns',
'orderBy',
'groupB... | true |
17a59c4270aee486f4d974cbf758a828416523e8 | PHP | Alabuja/scholamania | /app/Http/Controllers/UserController.php | UTF-8 | 1,919 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use DB;
// use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Requests;
use Validator;
use App\User;
use Image;
use File;
class UserController extends Controller
{
//
// public function __construct()
// {
// $this->middleware('aut... | true |
ecedbac4e4044c528639230ee01be8e2c296c34a | PHP | askwhyweb/PostAPI | /Plugin/Logger/RotatingFiles.php | UTF-8 | 1,298 | 2.890625 | 3 | [] | no_license | <?php
namespace OrviSoft\Cloudburst\Plugin\Logger;
class RotatingFiles implements LoggerInterface
{
private $dir;
private $file;
private $chanceOfCleanup = 1000;
private $numberOfOldLogs = 6;
private $uniqueId;
public function __construct($dir)
{
$this->dir = $dir;
$t... | true |
1511a906d16dcb6a0403a44667b20c45a1366b68 | PHP | grrr-amsterdam/garp3 | /library/Garp/Shell/Command/IoNiceIsAvailable.php | UTF-8 | 762 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Garp_Shell_Command_IoNiceIsAvailable
* Checks if the ionice command exists, and if permissions allow calling it.
* @author David Spreekmeester | Grrr.nl
*/
class Garp_Shell_Command_IoNiceIsAvailable extends Garp_Shell_Command_Abstract {
const COMMAND_IONICE_IS_AVAILABLE = 'location=`type -P ionice`;... | true |
2246f8bd631eebc6745d69d2f54c62ca0a010760 | PHP | the-shop/fortytwo-restapi | /src/RestApiApplicationInterface.php | UTF-8 | 1,411 | 2.734375 | 3 | [] | no_license | <?php
namespace Framework\RestApi;
use Framework\Base\Application\ApplicationInterface;
use Framework\RestApi\Auth\RequestAuthorization;
/**
* Interface RestApiApplicationInterface
* @package Framework\RestApi
*/
interface RestApiApplicationInterface extends ApplicationInterface
{
/**
* @param RequestAut... | true |
2b47b83c490d091d068ea10b9a2df276b5008b1c | PHP | ninggf/wulacms_module_sms | /api/v1/SendApi.php | UTF-8 | 3,707 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of wulacms.
*
* (c) Leo Ning <windywany@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace sms\api\v1;
use backend\classes\CaptchaCode;
use rest\api\v1\SessionApi;
use rest\classes\A... | true |
708c36f4d00bc99e3fd2c94723cc1593a1e28a87 | PHP | Totsy/Totsy-Platform | /app/extensions/helper/ApiHelper.php | UTF-8 | 4,375 | 2.65625 | 3 | [] | no_license | <?php
/* 2011-06-21 update notes
* - Moved errorCodes Method from Api::errorCodes() to ApiHelper::errorCodes();
*/
namespace app\extensions\helper;
use SimpleXMLElement;
class ApiHelper {
public static function converter ($data,$format = 'xml'){
if ($format == 'xml'){
$xml = static::__toXml($data, new Si... | true |
772c8d52af68be480027c8228b5cfe5ea634f991 | PHP | jigius/sknife | /src/Foundation/Singleton.php | UTF-8 | 1,294 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the utils library.
*
* (c) Eduard Chernikov <jigius@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace jigius\sknife\Foundation;
abstract class Singleton implements SingletonInter... | true |
d5d27c071f850825ce7e268bc1bbb38b713f55d9 | PHP | xlopok/spb-web | /src/Moguta/Controllers/MainController.php | UTF-8 | 552 | 2.59375 | 3 | [] | no_license | <?php
namespace Moguta\Controllers;
use Moguta\Models\Users\User;
use Moguta\View\View;
class MainController
{
private $view;
public function main()
{
$this->view = New View(__DIR__ . '/../../templates');
$this->view->renderHtml('main/main.php');
}
public function json($email)
... | true |
f14b8303b718fa72924d170ad76f661bf1e9ef26 | PHP | BlinkSun/LabyrintheGenerator | /mytest.php | UTF-8 | 2,245 | 3.109375 | 3 | [] | no_license | <?php
function RandomDirections() {
$cDir = array_fill(0, 4, array('X' => 0, 'Y' => 0));
switch (rand(0,3)) {
Case 0:
$cDir[0]['X'] = -1;
$cDir[1]['X'] = 1;
$cDir[2]['Y'] = -1;
$cDir[3]['Y'] = 1;
break;
Case 1:
$cDir[3]['X'] = -1;
$cDir[2]['X'] = 1;
$cDir[1]['Y'] = -1;
$cDir[0]['Y'] = 1;
break... | true |
04fc068a26d0d3db5ffc249de70d1fbde7bb7cc2 | PHP | npmcdn-to-unpkg-bot/test.dev | /app/Helpers/Helper.php | UTF-8 | 1,151 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
use App\Category;
use Illuminate\Support\Collection;
/**
* Created by PhpStorm.
* User: yura
* Date: 18.01.2016
* Time: 11:05
*/
class Helper
{
/**
* @param array $data
* @return string
*/
public static function treeToArray(\Kalnoy\Nestedset\Collection $tree)... | true |
9957d259e7714d117e5d8a5e13a0bc068c947871 | PHP | alex14fr/mn-wiki | /bin/backup-fetch.php | UTF-8 | 2,088 | 2.546875 | 3 | [
"BSD-2-Clause",
"Zlib",
"BSD-3-Clause",
"CC0-1.0"
] | permissive | <?php
function fetchFile($url, $sec, $f, $out, $pipe=false)
{
$query = array("time" => time());
$query["tok"] = hash_hmac("sha256", $f, $sec . $query["time"]);
$query["f"] = $f;
$data = http_build_query($query);
$context_options = array('http' => array('method' => 'POST',
'header' ... | true |
6558830c1b6bdc82c7cb793ec4b3b7959ffaaa2d | PHP | smordentedesign/Snowboarding | /addMountain.php | UTF-8 | 1,243 | 2.78125 | 3 | [] | no_license | <?php
include 'dbConnection.php';
//print_r($conn);
$state = $_POST["State"];
$mountain = $_POST["Mountain_Name"];
$elevation = $_POST["Highest_Elevation"];
$sql = "INSERT INTO Mountains (State, Mountain_Name, Highest_Elevation)
VALUES('$state', '$mountain', '$elevation')";
?>
<!DOCTYPE html>
<html lang="en">
... | true |
2aa014c7b76f835f88666651793d8bcef458fce9 | PHP | xiaocairen/nopis | /lib/nopis-src/Nopis/Lib/Entity/PropertyNotFoundException.php | UTF-8 | 1,056 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* This file is part of the Nopis package.
*
* (c) wangbin <wbhazz@163.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Nopis\Lib\Entity;
use Exception;
/**
* This Exception is thrown if an accessed prope... | true |
b621cb9a049a4d3f641ab4c5b3b26e6492181ff9 | PHP | Diefsto/prueba | /Calculadora.php | UTF-8 | 1,041 | 3.140625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
#comentario prueba git
<title>Calculadora</title>
</head>
<body>
<form method="post" action="Calculadora.php">
<input type="text" name="Numero1"><br>
<input type="text" name="Numero2"><br>
<select name="opciones">
<option value="0">Sumar</option>
<option value="1">Re... | true |
9fc149fbb818e3cff4242a79631eaec0ba8ca6e8 | PHP | jormat1124/jormat-sistema | /informe-contabilidadd.php | UTF-8 | 3,214 | 2.765625 | 3 | [] | no_license | <?php include("frontend/header.php");
if(!isset($_SESSION['rol'])) {header('location: login.php');}
// captura del nombre
$nombre = $_SESSION['nombre'];
//Manejo de fechas para los diferentes usuarios
ini_set('date.timezone','America/Santo_Domingo');
$dia = date("d",time());
$mes = date("m-",time());... | true |
4141c41b2ef33c0d48bf5192f6e5730447cce2c8 | PHP | Lo1176/color-test-php | /send_design.php | UTF-8 | 953 | 2.875 | 3 | [] | no_license | <?php
// on inclut ici aussi notre fichier design.php
include('design.php');
$expire = 365 * 24 * 3600;
// on envoie notre cookie de nom DESGIN (donc il sera utilisable via la variable $DESIGN) contenant la couleur choisie (c'est-à-dire le contenu de la variable $couleur)
setcookie("DESIGN", $_POST['couleur'], time() ... | true |
7e4fbd47d88a3cbd9223907ffe595346ff60bc58 | PHP | leosu1218/PHP_SunGirl | /framework/system/controllers/SmartyController.php | UTF-8 | 1,292 | 2.734375 | 3 | [] | no_license | <?php
/**
* Smarty Controller code.
*
* PHP version 5.3
*
* @category NeteXss
* @package Controller
* @author Rex Chen <rexchen@synctech-infinity.com>
* @copyright 2014 synctech.com
*/
require_once( FRAMEWORK_PATH . 'system/ResponserFactory.php' );
/**
* SmartyController 支援使用Smarty樣板模組來組合參數與樣板合成的View
*
* PHP version... | true |