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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
fa5f74c1c740e347cee70e40512ebd37082f2bb1 | PHP | mawmaw15/SecProg | /NIM/controller/doLogin.php | UTF-8 | 1,248 | 2.59375 | 3 | [] | no_license | <?php
include "./../database/db.php";
if($_SERVER["REQUEST_METHOD"] == 'POST') {
$username = $_POST['txtUsername'];
$password = $_POST['txtPassword'];
$hash_password = sha1($password);
$sql = "SELECT * FROM
users WHERE
username = '$username'
AND password = '$hash... | true |
c815da4adfe2f62ddd17c47ef2f9b2d01efaca2e | PHP | shemarlaurent/helyos-backend | /app/Console/Commands/WeeklyDraw.php | UTF-8 | 1,642 | 2.96875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\AbyssForum;
use Illuminate\Console\Command;
class WeeklyDraw extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'raffle:draw';
/**
* The console command description.
... | true |
7ad677496001e96c3c9f74f34a3c2ce9be0045d2 | PHP | alxrdk/php-mvc | /App/Model.php | UTF-8 | 335 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use \App\Database;
use \App\Config;
class Model
{
protected static function db() : \App\Database
{
static $dbh = null;
if ($dbh === null) {
$dbh = new Database(Config::DB_HOST, Config::DB_USER, Config::DB_PASSWORD, Config::DB_NAME);
}
return... | true |
c800f5e6e7a4225444a7d03a110103e64ae429de | PHP | devboard/thesting-data-source | /src/JsonReader.php | UTF-8 | 2,921 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace DevboardLib\Thesting\Source;
use Symfony\Component\Finder\Finder;
/**
* @see JsonReaderSpec
* @see JsonReaderTest
*/
class JsonReader
{
/** @var string */
private $basePath;
public function __construct(string $basePath)
{
$this->basePath = $basePa... | true |
92aa9b1c70bc4270965ccae1d0feb55028f6f2fd | PHP | sergiocast97/cm3108 | /rguevent/database/migrations/2019_10_12_192530_create_eventstaff_table.php | UTF-8 | 743 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEventstaffTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('eventstaff',... | true |
6ca6865dd1c988a5892acfb3e315edd46d6ca93c | PHP | ortizmas/www.psi.devs | /app/Http/Requests/Universities/UpdateUniversityRequest.php | UTF-8 | 1,099 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Universities;
use Illuminate\Foundation\Http\FormRequest;
class UpdateUniversityRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
... | true |
d748fc6d3cdcbfed815acb09ebc55a568ad9084b | PHP | Felidaeblackblue/php_new | /users.php | UTF-8 | 965 | 3.390625 | 3 | [] | no_license | <?php
$users = [
['Paul', 'bleu', 27],
['Camille', 'rouge', 38],
['Virgil', 'jaune', 42]
];
//var_dump($users);
?>
<!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... | true |
93735583840509305500902b11db7ead994e9c45 | PHP | renzcerico/bais-chaya | /class/Customer.php | UTF-8 | 29,996 | 2.921875 | 3 | [] | no_license | <?php
class Customer {
public $conn;
public function __construct($conn) {
$this->conn = $conn;
}
public function counter($id) {
$sql = 'SELECT
count(ch.id) as total_child,
count(cu.id) as total_custodian,
count(h.id) as family_application
FROM tbl_child ch
LEFT JOIN tbl_custodian... | true |
e41b7764f8cc0db9a3e6e19b37a45c7ccfb03d32 | PHP | linepogl/oxygen | /src/TypeSystem/MetaTypes/InternalTypes/Arrays/MetaIDArrayOrNull.php | UTF-8 | 441 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class MetaIDArrayOrNull extends XNullableArrayType {
private static $instance;
public static function Init(){ self::$instance = new self(); }
/** @return MetaIDArrayOrNull */ public static function Type(){ return self::$instance; }
protected static function Encode($array){ return MetaIDArray::Encode($arra... | true |
798db70b5ab7fb31d315c73d37a8761e31650a21 | PHP | slavokozar/CodeTutor | /app/Models/Assignments/Solution.php | UTF-8 | 1,166 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Assignments;
use App\Models\Users\User;
use Illuminate\Database\Eloquent\Model;
class Solution extends Model
{
protected $table = 'assignment_solutions';
protected $fillable = [
'assignment_id',
'code',
'user_id',
'lang_id',
'filename',
... | true |
7ee4c10e5bc252b3d6e0b2062bab03d34d696180 | PHP | bersanots/FEUP-LBAW | /app/Media.php | UTF-8 | 440 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Media extends Model
{
// Don't add create and update timestamps in database.
public $timestamps = false;
protected $primaryKey = 'media_id';
protected $table = 'media';
/**
* The users that have this media as their favourite
*/
... | true |
ebc75db31e84a5e25958357a57bf8504e82814ab | PHP | cuthbert/izzum-statemachine | /src/statemachine/persistence/Tooling.php | UTF-8 | 3,877 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace izzum\statemachine\persistence;
/**
* this Tooling interface can be implemented by creating a subclass of Adapter or by
* creating a subclass from one of the existing Adapter subclasses.
*
* The Adapter subclass (a data access object) will then allow you to gather
* data related to the statemachi... | true |
5093772d73de0bb40a8659f8782d314681d647fc | PHP | fernandoobarbosa/TestePhp | /cadastrar_cidade.php | UTF-8 | 395 | 2.6875 | 3 | [] | no_license | <?php
require_once('classes/cidade.php')
?>
<form method="post">
Nome : <input type="text" name="Cidade" required></br></br>
<input type="submit" name="submit" value="Cadastrar"></br>
<?php
if (isset($_POST['submit'])) {
$function = new Cidade();
$cidade = $_POST['Ci... | true |
949a8e4cecf645b5339b5942f0643c3bb017fecc | PHP | FIT-Cool/pw2-assignment01-20191-avinash322 | /function/pasien_function.php | UTF-8 | 1,551 | 2.609375 | 3 | [] | no_license | <?php
function getPasien(){
$link = new PDO("mysql:host=localhost;dbname=prakpw220191", "root", "");
$link->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE);
$link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$query = "SELECT p.med_record_number,p.citizen_id_number,p.name,p.address,p.birth_place,p... | true |
032a76d6d33a902aa26d3dac7a5d2b98fa39ab78 | PHP | odhier/eraport-prod | /database/migrations/2020_12_27_100715_create_kkm_table.php | UTF-8 | 1,000 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateKkmTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kkm', function (Blu... | true |
3fde8572edfb2d15a95fc608202ab427fe286498 | PHP | fendy3002/QzPhp | /src/QzPhp/Logs/StringLog.php | UTF-8 | 378 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace QzPhp\Logs;
class StringLog implements ILog {
public $data = '';
public function message($message){
$this->data .= $this->data . $message;
}
public function messageln($message = NULL){
$this->data .= $this->data . $message. "\n";
}
public function object ($object... | true |
43b19120974ac1b34e0f5cc594c7990031c33df9 | PHP | br-g/CLP-Website | /admin/model/GalleryImage.php | UTF-8 | 1,647 | 2.671875 | 3 | [] | no_license | <?php
class GalleryImage extends Elem {
var $galleryId;
var $upload;
function __construct() {
parent::__construct();
$this->galleryId = -1;
$this->upload = null;
}
function loadFromDB($tuple) {
parent::loadFromDB($tuple);
$this->galleryId = $tuple['galleryId'];
$this->upload = new Upload();
... | true |
09ddd828a2cf9e19e215381bac40c120fc8677fd | PHP | icchiy/survey | /check.php | UTF-8 | 2,517 | 2.71875 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PHP基礎</title>
</head>
<body>
<?php
$dsn='mysql:dbname=phpkiso;host=localhost';
$user='root';
$password='';
$dbh=new PDO($dsn,$user,$password);
$dbh... | true |
c1f228db345c5651ddcd5ccbb93043fc597b9044 | PHP | webmania2014/mvhdev | /application/modules/acceptance/models/acceptance_model.php | UTF-8 | 6,961 | 2.515625 | 3 | [] | no_license | <?php if( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
class Acceptance_model extends CI_Model{
function get_workers() {
$workers = array();
$query = $this->db->query('SELECT id, first_name, last_name FROM ltno_workers');
foreach ($query->result() as $row) {
... | true |
44b2af2c2b0ce7922d984302a7ba754d8fc18ef1 | PHP | danis24/wsa-panel | /app/Http/Traits/ClientTrait.php | UTF-8 | 425 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Traits;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
trait ClientTrait
{
protected function postData($data)
{
$client = new Client();
return $client->request("POST", env("DICE_SITE").env("DICE_API_URL"), $data);
}
public function getData()... | true |
4b66d5335be5bc6e5cfee1cc1430c2261e0299c7 | PHP | assuncaovictor/Design-Patterns-em-PHP | /src/Descontos/DescontoMaisDe5Itens.php | UTF-8 | 414 | 2.6875 | 3 | [] | no_license | <?php
namespace Assuncaovictor\DesignPattern\Descontos;
use Assuncaovictor\DesignPattern\Orcamento;
final class DescontoMaisDe5Itens extends VerificaDesconto
{
protected function conficaoDoDesconto(Orcamento $orcamento): bool
{
return $orcamento->quantidadeItens > 5;
}
protected function val... | true |
8831db35f2b9365f539c04da590b2c9f173fb3c6 | PHP | jorgegarces/bikelog | /tests/unit/Domain/Model/Bike/BikeDTOBuilder.php | UTF-8 | 1,348 | 2.875 | 3 | [] | no_license | <?php
namespace App\Tests\unit\Domain\Model\Bike;
use App\Domain\Model\Bike\BikeDTO;
class BikeDTOBuilder
{
private $id;
private $brand;
private $model;
private $year;
private $plateNumber;
private function __construct()
{
$this->id = '83da585c-5788-4a39-a2ee-3fc568397b3f';
... | true |
91433d50b49ba8022ec55bfc0a5c26a8e0720003 | PHP | chuck-cp/bjyltf | /cms/modules/sign/models/SignImage.php | UTF-8 | 1,266 | 2.78125 | 3 | [] | no_license | <?php
namespace cms\modules\sign\models;
use Yii;
/**
* This is the model class for table "yl_sign_image".
*
* @property string $sign_id 签到表的ID
* @property int $sign_type 签到类型(1、业务员签到 2、维护人员签到到)
* @property string $image_url 店铺图片(多个图片以逗号分割)
*/
class SignImage extends \yii\db\ActiveRecord
{
/**
* {@inh... | true |
66be019f21154ea6ff0103824ea7d9bdbd551c36 | PHP | wowrainyman/Sarfejoo | /catalog/model/provider/pu_attribute.php | UTF-8 | 10,924 | 2.515625 | 3 | [] | no_license | <?php
require_once "provider.php";
require_once "settings.php";
class ModelProviderPuAttribute extends Model
{
public function addAttribute($data)
{
$this->db->query("INSERT INTO " . DB_PREFIX . "attribute SET attribute_group_id = '" . (int)$data['attribute_group_id'] . "', sort_order = '" . (int)$da... | true |
8db2b932198855cbadfd6870610335f33290da7a | PHP | GoelVaibhav009/Laravel-Food-Delivery-API | /app/Http/Controllers/OrderItemController.php | UTF-8 | 1,546 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\OrderItem;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class OrderItemController extends Controller
{
public function index()
{
return OrderItem::all();
}
public function store(Request $request... | true |
fbe698ccc47d49df4ad60c407be381a2993a1078 | PHP | imran420/Dynamic_Slider | /dis.php | UTF-8 | 682 | 2.65625 | 3 | [] | no_license | <?php
include_once 'dbconnect.php';
//Create connection and select DB
$db = new mysqli($dbHost, $dbUsername, $dbPassword, $dbName);
//Check connection
if($db->connect_error){
die("Connection failed: " . $db->connect_error);
}
//Get image data from database
$result = $db->query("SELE... | true |
01743a2bdd435d71290d039bae166901f9a776a4 | PHP | willyestrada81/RecruTECH | /helpers/system_helper.php | UTF-8 | 5,378 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
function redirect($page = FALSE, $message = NULL, $message_type = NULL) {
if (is_string ($page)) {
$location = $page;
} else {
$location = $_SERVER['SCRIPT_NAME'];
}
// Check for message
if ($message != NULL) {
// Set message
... | true |
334f8e360b9479f42f323a618f40bd06332c851d | PHP | kmelo/myHealthHub | /public/removemed.php | UTF-8 | 682 | 2.609375 | 3 | [] | no_license | <?php
// configuration
require("../includes/config.php");
if ($_SERVER["REQUEST_METHOD"] == "GET")
{
//retrieve user's current list of medications
$drugs = CS50::query("SELECT drugName FROM medication WHERE userId=?",$_SESSION["id"]);
// render user's current medication list
render("remove_med.ph... | true |
b90085f9dec8764a2f3822b509e186c0f5ce60c9 | PHP | welcomedcoffee/dcoffee | /src/frontend/models/store/Preferential.php | UTF-8 | 1,455 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\models\store;
use Yii;
/**
* This is the model class for table "fin_preferential".
*
* @property integer $preferential_id
* @property integer $merchant_id
* @property integer $preferential_type
* @property string $preferential_content
* @property integer $preferential_start
* @proper... | true |
f4ad25619c06a6940d20be7e3a689a61b2949ce6 | PHP | AnaHolgado/DWES | /CapituloIV/ej13.php | UTF-8 | 3,519 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<!--Ejercicio 13. Escribe un programa que lea una lista de diez números y
determine cuántos son positivos, y cuántos son negativos.
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="keywords" content="Ejercicios PHP">
<meta name="author" content="Ana Holgado">
<title>Apren... | true |
7450749aec0f7e03f68b9af4e002c4fe0dfd8847 | PHP | jaydson/Kactoos-API | /tests/KactoosAPITest.php | UTF-8 | 5,472 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'PHPUnit/Framework.php';
require_once dirname(__FILE__) . '/../kactoos-api.php';
/**
* Test class for KactoosAPI.
* Generated by PHPUnit on 2011-06-14 at 18:08:16.
*/
class KactoosAPITest extends PHPUnit_Framework_TestCase {
/**
* @var KactoosAPI
*/
protected $object;
/*... | true |
ee7834b0dd84be51837d689f8a8ad377574652ed | PHP | nabilelmoudden/2015 | /anaconda-project/businessCore/components/Business/GoogleAnalytics.php | UTF-8 | 689 | 2.65625 | 3 | [] | no_license | <?php
namespace Business;
/**
* Description of GoogleAnalytics
*
* @author JalalB
* @package Business.GoogleAnalytics
*/
class GoogleAnalytics extends \GoogleAnalytics
{
// *********************** STATIC *********************** //
static function model($className=__CLASS__)
{
return parent::model($cl... | true |
fd53845baf4a5e49f7f7a547ee9e0fce4b628351 | PHP | wangyuesong/RateMyProfessor | /protected/models/User.php | UTF-8 | 4,446 | 2.59375 | 3 | [] | no_license | <?php
/**
* This is the model class for table "User".
*
* The followings are the available columns in table 'User':
* @property string $account
* @property string $academy
* @property string $password
* @property string $name
* @property integer $gender
* @property string $email
* @property string $phone
* ... | true |
c98256d6866f0a0d1ba7d604b194e42a27c4ae91 | PHP | darfio/weather | /app/Http/Controllers/WeatherController.php | UTF-8 | 774 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Weather\YahooWeatherServiceProvider;
use App\Weather\WeatherService;
class WeatherController extends Controller
{
public function index(){
$yahooWeather = new YahooWeatherServiceProvider();
$weather_service = new WeatherService($y... | true |
2200bca4374286838d7f170db77364dd05eba90b | PHP | Saima1977/hotspot | /admin/test.php | UTF-8 | 660 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
function debugLogger($stmt)
{
$dir = "/var/www/hotspot/log/";
$dir_path = $dir."HS_ADMIN_DEVICE.log";
if (!file_exists($dir) )
{
$oldmask = umask(0); // helpful when used in linux server
mkdir($dir, 0744);
}
else
{
echo $dir_path." File Exists!<br/>";
}
... | true |
180f896b9e126b0d5c18c62bf301e8bb1f14ad57 | PHP | aminerahmouni/anchour | /src/jubianchi/Output/Symfony/Adapter/ConsoleOutputAdapter.php | UTF-8 | 396 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace jubianchi\Output;
use Symfony\Component\Console\Output\ConsoleOutput;
class ConsoleOutputAdapter implements OutputInterface
{
private $output;
public function __construct(ConsoleOutput $output)
{
$this->output = $output;
}
public function __call($name, $args)
{
... | true |
f058896a2e6500aa8ef2fc368bd7e514668232ab | PHP | juancitowillyr46/php-pet-hotel-web | /Backend/src/BackOffice/Pets/Domain/Entities/PetEntity.php | UTF-8 | 7,688 | 2.53125 | 3 | [] | no_license | <?php
namespace App\BackOffice\Pets\Domain\Entities;
use App\BackOffice\Pets\Domain\Exceptions\PetActionRequestSchema;
use App\Shared\Domain\Entities\Audit;
use App\Shared\Utility\SecurityPassword;
use Exception;
use Ramsey\Uuid\Uuid;
class PetEntity extends Audit
{
public string $name;
public string $age;
... | true |
a5a1ffb8b81afa0aba96e9b26c226be72d17a4ab | PHP | theOstrich952/PersonalSite | /View/Projects/Modify/ajax/homeAjax.php | UTF-8 | 547 | 2.515625 | 3 | [] | no_license | <?php require_once '../include/databaseConnection.php';
$type = $_POST['type'];
$query = "SELECT * FROM products where type LIKE %'$type'%";
$result = mysqli_query($con, $query);
$resultArr = array();
$x = 0;
while($row = mysqli_fetch_assoc($result))
{
$resultArr[... | true |
72a1c51c5180c21efaf45dda8e9ca8baebc82361 | PHP | Ekimik/image-share | /app/model/Adapters/AdapterFactory.php | UTF-8 | 1,884 | 2.796875 | 3 | [
"Unlicense"
] | permissive | <?php
namespace App\Model\Adapters;
use \Nette\Object,
\Nette\Utils\Strings,
\App\Model\Exceptions\InvalidArgumentException,
\App\Strategies\Notification\EmailNotification,
\App\Strategies\Notification\NullNotification,
\App\Model\Services\ConfigParams;
/**
* @author Jan Jíša <j.jisa@seznam.cz>
... | true |
764b805ddae4fdf8ee2f57a6938c93d2c94202c3 | PHP | adehikmatiana/materi-laravel-haltev | /Week 2/Day1/code/variabel.php | UTF-8 | 659 | 3.609375 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>belajar variabel</title>
<?php
$nama = "Tiana";
$umur = 21;
$pesan = "Saya sedang belajar PHP";
?>
</head>
<body>
<h1>Halo, nama saya <?= $na... | true |
2b776294344b98f1b0ce5523b817085c9930cec0 | PHP | beniwal-devika/IIT-Courses-CS430 | /dijkstrasAlgorithm.php | UTF-8 | 1,061 | 3.484375 | 3 | [] | no_license | <?php
class dijkstrasAlgorithm {
function __construct() {
}
function findMinimumKey($key, $mset) {
$min = INF;
foreach ($key as $index => $value) {
if ($mset[$index] == 'false' && $min >= $value) {
$min = $value;
$minIndex = $index;
... | true |
d7e05880d30b0c926c2b7d4dc10a5869494b3dfb | PHP | dragostinova/php7-design-patterns | /Tests/Creational/SimpleFactoryTest.php | UTF-8 | 1,439 | 2.890625 | 3 | [] | no_license | <?php
namespace DesignPatterns\Tests\Creational;
use DesignPatterns\Creational\SimpleFactory\CsvReport;
use DesignPatterns\Creational\SimpleFactory\JsonReport;
use DesignPatterns\Creational\SimpleFactory\ReportFactory;
use DesignPatterns\Creational\SimpleFactory\ReportInterface;
use PHPUnit\Framework\TestCase;
final... | true |
ab20d9bfc7a35d4f7d780ffbb83a36eab254e9e8 | PHP | CodiumTeam/legacy-training-php | /print-date/src/Calendar.php | UTF-8 | 121 | 2.71875 | 3 | [] | no_license | <?php
namespace PrintDate;
class Calendar
{
public function now()
{
return date("Y-m-d H:i:s");
}
} | true |
2814e9dc8fdc3941a39edcf934273d8d296d6d7c | PHP | valmayaki/countryapp | /app/Core/Http/Response.php | UTF-8 | 2,529 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Core\Http;
class Response
{
protected $body;
protected $status;
protected $headers;
function __construct($content='', $status = 200, $headers = [])
{
$this->body = $content;
$this->status = $status;
$this->headers = $headers;
}
public function s... | true |
eb0f7ca3142858441a6340af389117d8023dc27a | PHP | omar-farooq/duffa | /php/models/Database.php | UTF-8 | 781 | 3.03125 | 3 | [] | no_license | <?php
class Database
extends PDO
{
const PDO_HOST = '';
const PDO_DATABASE = '';
const PDO_USERNAME = '';
const PDO_PASSWORD = '';
const PDO_OPTIONS = [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"];
public function __construct ()
{
try {
parent::__constru... | true |
a5bcc7c12647451188d9df81efb2a112d4f67e93 | PHP | xepps/jollymagic | /app/tests/Sitemap/SitemapBuilderTest.php | UTF-8 | 1,853 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Jollymagic\Sitemap;
class SitemapBuilderTest extends \PHPUnit_Framework_TestCase
{
public function testThatGivenASiteMapItGeneratesAListOfSitemapUrlObjects()
{
// $sitemapBuilder = new SitemapBuilder('http://test.com', $this->getMockSiteConfig());
// $expectedSitemap =
... | true |
96b91c7fcddf0b908442af98f3f0f62d78d3c169 | PHP | DoubleLift3/Assignment3 | /FW_Assignment3/framework/Data_Mapper.php | UTF-8 | 1,204 | 2.78125 | 3 | [] | no_license | <?php
namespace Quwi\framework;
abstract class Data_Mapper{
//protected $pdo;
public function __construct()
{
//$reg = Registry::instance();
//$this->pdo = $reg->getPdo();
}
abstract protected function findAll();
abstract protected function find(string $id);
abst... | true |
26d90229a0fca460ba18f5674a5dbcb717f89234 | PHP | signifly/travy-schema | /src/Sidebar.php | UTF-8 | 1,220 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Signifly\Travy\Schema;
use JsonSerializable;
use Signifly\Travy\Schema\Concerns\Instantiable;
/** @method static static make($name, array $groups) */
class Sidebar implements JsonSerializable
{
use Instantiable;
/**
* The displayable name of the tab.
*
* @var string
*/
... | true |
a6d13579f566ba72d7a8284a1c56841f87190e4c | PHP | astratow/easy_steps | /forloop.php | UTF-8 | 464 | 3.765625 | 4 | [] | no_license | <!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title> Basic PHP template - Performing for loops</title>
</head>
<body>
<?php
#write traditional greetings;
echo '<h1>Performing for loops</h1>';
for($i=1; $i<4; $i++){
echo "<dt>Outer loop iteration $i";
#... | true |
bd16df4d79fe64ef26f536946a1365ab7b057d7e | PHP | ishikhir/gsworkphp | /php03/functions.php | UTF-8 | 614 | 2.984375 | 3 | [] | no_license | <?php
/** 共通で使うものを別ファイルにしておきましょう。*/
//DB接続関数(PDO)
function pdoLocalhost(){
try {
return $pdo = new PDO('mysql:dbname=myHome;charset=utf8;host=localhost','root','');
}catch (PDOException $e) {
exit('DbConnectError:'.$e->getMessage());
}
}
//SQL処理エラー
function qerror($stmt){
$error = $stmt->errorInfo();
exit("... | true |
fc6a36e195e778997a3b938e8f3883a0f70ac98e | PHP | nextras/orm | /src/Collection/Helpers/ArrayCollectionHelper.php | UTF-8 | 5,456 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Nextras\Orm\Collection\Helpers;
use Closure;
use DateTimeImmutable;
use DateTimeInterface;
use Nette\Utils\Arrays;
use Nextras\Orm\Collection\Aggregations\IArrayAggregator;
use Nextras\Orm\Collection\Functions\CollectionFunction;
use Nextras\Orm\Collection\Functions\FetchPr... | true |
d07f0bde3b2f0dfb60162c1cbfb5d0d73111a1c2 | PHP | boy-luo/fancy | /dataforrand.php | UTF-8 | 23,193 | 2.578125 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<!-- 如果没有此声明,IE低版本将不能解释固定在两边的盒子 -->
<html>
<head>
<title>处理我的数据</title>
<!-- 使页面的编码是utf-8,避免在浏览器输出的是乱码 -->
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<!-- 包含css文件 -->
<link rel = "stylesheet" type = "text/css" href = "data.css">
<?php
include ("... | true |
c1992a4677bb2278309374a900aad34e2591a368 | PHP | xXCaulDevsYT/KitPvP | /src/kitpvp/duels/pieces/Arena.php | UTF-8 | 1,197 | 3.203125 | 3 | [] | no_license | <?php namespace kitpvp\duels\pieces;
use pocketmine\Player;
use pocketmine\math\Vector3;
use pocketmine\level\{
Level,
Position
};
class Arena{
public $id;
public $name;
public $spawn1;
public $spawn2;
public $level;
public function __construct($id, $name, Vector3 $spawn1, Vector3 $spawn2, Level $level){
... | true |
9a4b1de3b3df41505eae0ae8e887e7f2332554f4 | PHP | warner23/kkblog | /app/core/class/Db.php | UTF-8 | 8,597 | 3.125 | 3 | [] | no_license | <?php
/**
* Database Class
* Created by Warner Infinity
* Author Jules Warner
*/
class Db extends PDO
{
private static $_instance;
public function __construct($DB_TYPE, $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS)
{
try {
parent::__construct($DB_TYPE.':host='.$DB_HOST.';dbname='.$DB_NAME.';char... | true |
763bc8eecbfc49ef23330e0b8b8219c18bc31396 | PHP | softsquad-git/movie | /app/Helpers/Status.php | UTF-8 | 733 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
class Status
{
public const OFF = 0;
public const ON = 1;
public const WAITING = 2;
public const LOCKED = 3;
/**
* @param int $statusCode
* @return string|null
*/
public static function getNameStatus(int $statusCode): ?string
{
switch ($... | true |
916373e53eaf2bf6d1cebc7e094402c0ccc02725 | PHP | minioak/royalmail-shipping | /src/Structs/ContentDetails.php | UTF-8 | 3,482 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Minioak\Royalmail\Shipping\Structs;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for contentDetails Structs
* Meta informations extracted from the WSDL
* - documentation: schema to hold array of single parcel structures
* @subpackage Structs
*/
class ContentDetails exte... | true |
1c6d0ba91574c31b7810ba1170cc3416955fd721 | PHP | nelson6e65/Geonames | /src/Console/Geoname.php | UTF-8 | 902 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace MichaelDrennen\Geonames\Console;
use Illuminate\Console\Command;
class Geoname extends Command {
use GeonamesConsoleTrait;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'geonames:geoname';
/**
* The console ... | true |
f91242b47c2f6e863820625846667358c6c358a1 | PHP | Audrene-C/comparOperateur | /apps/add-destination.php | UTF-8 | 4,983 | 2.640625 | 3 | [] | no_license | <?php
$path = str_replace('apps', '', __DIR__);
//include($path.'/comparOperateur/config/autoload.php');
include($path.'/config/autoload.php');
//include_once $path.'/comparOperateur/partials/connection.php';
include_once $path.'/partials/connection.php';
$destinationsManager = new DestinationsManager($pdo);
$osef = n... | true |
56fec8d49c5777345875f69b1db2829a7409b18d | PHP | vladimirshornikov125/wp-downloader | /src/NoopCoreInstaller.php | UTF-8 | 3,955 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php # -*- coding: utf-8 -*-
/*
* This file is part of the wp-downloader package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WCM\WpDownloader;
use Composer\Installer\InstallerInterface;
... | true |
8af3f55560aef4f2014ef8673668144008591f52 | PHP | seanphan05/Marketing_Campaigns_Report_Generating_Application | /frontend/php/editDetails/getCampaignDetailsAjax.php | UTF-8 | 1,650 | 2.71875 | 3 | [] | no_license | <?php
include('../config.php');
if(isset($_POST['year'] , $_POST['month'], $_POST['promo'])) {
try {
$year = $_POST['year'];
$month = $_POST['month'];
$promo = $_POST['promo'];
$con = new PDO($dsn, $username, $password, $options);
$sql = "SELECT `Months`, `Promo Name`, `Campaign Details`... | true |
0d5e9727d4683f185be3ae42d43919517fe595b1 | PHP | magnuslopes23/WC4U | /events.php | UTF-8 | 535 | 2.578125 | 3 | [] | no_license | <?php
require_once "server.php";
if(isset($_POST)){
$name=filter_input(INPUT_POST,'fullname');
$event=filter_input(INPUT_POST,'event');
$fees=filter_input(INPUT_POST,'fees');
$sql="INSERT INTO events (fullname, event, fees) VALUES ('$name','$event', '$fees')";
if(mysqli_query($db, $sql)){
echo "Record... | true |
810f78e9b057ec1892a4e90ad3280030d747f530 | PHP | TarikAmine/Xoops-TManager | /class/tmanagertheme.php | UTF-8 | 5,121 | 2.609375 | 3 | [] | no_license | <?php
class TManagerTheme{
private $_instance = null;
private $_obj = null;
private $_css = array();
/**
* constructor
*/
private function __construct(TManagerPreset $obj)
{
$this->_obj = $obj;
//$this->_obj = new TManagerPreset();
$this->loadCss();
}
public static function... | true |
e7d8f720e2594dafdbdc2a587433b715f043281b | PHP | alan707/gramofon | /api/application/core/MY_Input.php | UTF-8 | 980 | 2.921875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
/**
* Extending core CI Input class to add support for PUT vars.
*/
class MY_Input extends CI_Input
{
/**
* Fetch an item from the POST array
*
* @access public
* @param string
* @param bool
* @return ... | true |
51e6696e3e12f71d9f007864ca8c9eb5b947765f | PHP | saruhei/SamuraiCoding2012_Server | /yaguchi_stub/RailsFrontEndStub.php | UTF-8 | 1,016 | 2.59375 | 3 | [] | no_license | <?php
require_once 'RailsSql.php';
require_once 'HTTP/Request.php';
// settings begin
// $game_engine_url = 'http://murooka.me/echo.php';
$game_engine_url = 'http://path/to/gameengine';
$on_server = false;
// settings end
$ai_urls = array();
if ($on_server) {
foreach ($_REQUEST['ai_urls'] as $ai_url) {
... | true |
d288709aad145d77e1ddaa16d3b24335678750f6 | PHP | Pangil12/search-engine-project | /adminPage/includes/searchQueries.php | UTF-8 | 1,504 | 3.078125 | 3 | [] | no_license | <?php
include_once 'dbinfo.php';
echo "<table class='table table-striped table-hover'>";
echo "<thead class='bg-info'>
<th scope='col'>Search Query</th>
<th scope='col'>Number of Page Results</th>
</thead>
<tbody>\n";
class Tab... | true |
e6aeecbde27e6f159d16a3737e7332cccacdf71a | PHP | CoBeCTb-RooL/alma | /[models]/UserModel.php | UTF-8 | 3,645 | 2.75 | 3 | [] | no_license | <?php
class User
{
const TBL = 'users';
var $id
, $surname
, $name
, $fathername
, $password
, $birthdate
, $email
, $phone
, $salt
, $registrationDate
, $registrationIp
, $lastActivity
, $lastIp
, $sex
, $active;
function init($arr)
{
if($arr)
{
$u = new User;
... | true |
bfcd0c8e54888fa1830871cf8784b7c681c0834d | PHP | Tindata/WebApp | /scoreACT.php | UTF-8 | 4,829 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
$servername = "";
$username = "";
$password = "";
$dbname = "";
$name;
$DSID;
$url;
$htmldescription;
$region;
//error_reporting(0);
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connec... | true |
8de9f8c34af64f29f6c0c65e9f42d6897b141151 | PHP | andersonSinaluisa/Employed | /ApiCompany/controllers/usuarioController.php | UTF-8 | 3,835 | 2.625 | 3 | [] | no_license | <?php
require_once('./class/conf/Persona.php');
require_once('./class/mov/Sesion.php');
require_once('./class/conf/Usuario.php');
require_once('./class/conf/Main.php');
require_once('./class/mov/Sesion.php');
require_once('./core/mainModel.php');
class UsuarioController
{
public functi... | true |
92f0572b80cfb15377f40bee543bf180aba8f92f | PHP | jnahian/LV-BLOG | /app/models/Post.php | UTF-8 | 1,070 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
class Post extends Eloquent {
/**
* The database table used by the model
*
* @var string
*/
protected $table = 'posts';
/**
* The unfillabel fields of the table
*
* @var array
*/
protected $guarded = ['approved'];
/**
* The rules for validatin... | true |
3d615ddfaf9bd96581032cf31c7cb8b973d30ca8 | PHP | JulienSacher/ECF_Back_part_1 | /src/DataFixtures/AppFixtures.php | UTF-8 | 4,365 | 2.8125 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use App\Entity\User;
use App\Entity\Project;
use App\Entity\SchoolYear;
use EasySlugger\Slugger;
class AppFixtures extends Fi... | true |
2a9d6e36072c9b3169cfcc70f6bbf9804330e2ee | PHP | kidflash23/CST-236 | /Milestone_1_Final_Project/Discount.php | UTF-8 | 2,629 | 3.21875 | 3 | [] | no_license | <?php
require_once 'database.php';
//This is the given code for the discount. We see that it has multiple discounted values for a quarter and halh
class Discount
{
private $promotion;
private $amount;
private $percent;
private $used;
public function __construct()
{
$this->prom... | true |
f673c080219bda84ae1ce84cec9294fe48b658fc | PHP | randimays/codeup.dev | /php/db_connect.php | UTF-8 | 497 | 2.78125 | 3 | [] | no_license | <?php
// Use Sequel Pro to create a new database, user and password. Create a park_migration file that connects to the database and creates a table called national_parks. Populate the table with all national park information for the United States using a file called park_seeder.
$dbc = new PDO('mysql:host=' . DB_HOST... | true |
84e6137a72713158432c3d159e79f740286d768b | PHP | yehster/oemrdoc | /Entities/RXNConUsage.php | UTF-8 | 674 | 2.578125 | 3 | [] | no_license | <?php
namespace library\doctrine\Entities;
/** @Entity
* @Table(name="dct_med_names_usage")
*/
class RXNConUsage {
public function __construct($rxnconso)
{
$this->RXNCon=$rxnconso;
$this->frequency=1;
}
/**
* @Id
* @Column(type="integer",name="id")
* @GeneratedValue(strategy=... | true |
8c9a77faffe7726155ac302eb83563976f702230 | PHP | 3etechinns/DRCmobile-money-sms-process | /Controlleur/livreurprocess.php | UTF-8 | 2,019 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: samy
* Date: 4/6/17
* Time: 1:20 PM
*/
require_once '../Model/Livreur.php';
if( isset($_POST['details'])) {
$data =null;
$compt = null;
$tableau = Livreur::afficherLivreur();
if ($tableau != null) {
foreach ($tableau as $row) {
$dat... | true |
906c17824606a5b73d8a8e05df9648e3ec88aca2 | PHP | InspektorGadjet/FileSharing | /src/Project/Controllers/DeleteController.php | UTF-8 | 585 | 2.828125 | 3 | [] | no_license | <?php
namespace Project\Controllers;
class DeleteController
{
private $fileManager;
private $filesDataGateway;
public function __construct(\PDO $pdo)
{
$this->fileManager = new \Project\Models\FileManager();
$this->filesDataGateway = new \Project\Models\FilesDataGateway($pdo);
}
public function delete(str... | true |
148ce91e7703a87d2e6b4eb533647b6e973b7e98 | PHP | L200170046/PWD | /MODUL 5/L200170046/barang.php | UTF-8 | 2,438 | 2.578125 | 3 | [] | no_license | <html>
<head><title>Data Penjualan</title></head>
<?php
$conn = mysqli_connect('localhost', 'root', '', 'penjualan');
?>
<body>
<center>
<h3>Masukan Data Penjualan:<h3>
<table border='0' width='30%'>
<form method='POST' action='barang.php'>
<tr>
<td width='25%'>Kode Barang</td>
<td width='5%'>:</td>
<td wi... | true |
6b2b79dc5cadb1a576ac11789c178bf1e9274f54 | PHP | Harrywithrian/WebServiceKlimatologi | /src/entitas/periode.php | UTF-8 | 1,524 | 2.78125 | 3 | [] | no_license | <?php
class periode {
//variable kode
private $kd_klimatologi;
private $kd_klasifikasi;
//koneksi db
public function __construct($connect) {
$this->connect = $connect;
}
//set tampil periode kelompok
public function setTampilPeriode($kd_klasifikasi) {
$this->kd_klasifikasi = $kd_klasifikasi;
}
//set... | true |
4f9b265c5a63cb11d88759cb0139c34857cac514 | PHP | libgraviton/compose-transpiler | /src/Replacer/ReplacerAbstract.php | UTF-8 | 567 | 2.71875 | 3 | [] | no_license | <?php
/**
* replacer abstract
*/
namespace Graviton\ComposeTranspiler\Replacer;
use Neunerlei\Arrays\Arrays;
use Psr\Log\LoggerInterface;
abstract class ReplacerAbstract {
protected $logger;
public function setLogger(LoggerInterface $logger) {
$this->logger = $logger;
}
final public funct... | true |
cbe0d0114c2861550f40b216966650e4758d277c | PHP | anytizer/cropnail.php | /bin/class.clis.inc.php | UTF-8 | 1,016 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace cli;
function cli_2($argv = [])
{
#stop("Parameter 2");
switch ($argv[1]) {
case "list":
process_list();
break;
case "report":
process_report();
break;
default:
stop("Invalid selector: {$argv[1]}.");
... | true |
4effa8239e92f7cae0aa4dd6514833ed59276553 | PHP | zjq1227/lampOS | /database/migrations/2019_08_05_073905_create_brand_table.php | UTF-8 | 1,065 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBrandTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('brand', function ... | true |
77ad73f9186cf70fde6e54ab10c476e66875c532 | PHP | zentesty/DailyList | /Hello.php | UTF-8 | 1,578 | 2.53125 | 3 | [] | no_license | <?php
require_once "M3UFile.php";
/**
* Created by PhpStorm.
* User: martin-pierreroy
* Date: 2018-10-03
* Time: 3:46 PM
*/
//echo @date('dmy') . "</br>" ;
//$m3ufile = new M3UFile();
//$m3ufile->is_ready();
//echo @date_create(@date('dmy'))->modify('-15 days')->format('dmy');
//echo "</br>" ;
//
//$x = 0;
//e... | true |
aef3cf6dfd7686be38777bc9c23a1c7ef7874cb2 | PHP | Giildardo/Papeleria | /web/vistas/main.php | UTF-8 | 1,443 | 2.84375 | 3 | [] | no_license | <?php
require_once 'abstracta.php';
require_once 'inteface.php';
include '../conec.php';
/**
*
*/
class Productos extends Operacion
{
public function Modificar($id,$nom,$pre,$exis,$des){
include '../conec.php';
echo "Soy el id v1:<br>"."$id"."<br>";
$collection->updateMany(['_id' => new ... | true |
6701096e3c1637264ae5efd0c1a891249198f62f | PHP | waltersono/sigevendas.co.mz | /app/Http/Controllers/Auth/ProfileController.php | UTF-8 | 2,008 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\Models\User;
use Hash;
/**
* Controller responsible for handling user profile managment
*
* @autor Walter Sono
*/
class ProfileController extends Controller
{... | true |
8fad11609c46d7e48c44813e8fc2c1310443b812 | PHP | JakeNierop/Framework | /school/PHP/foreach.php | UTF-8 | 311 | 3.125 | 3 | [] | no_license | <?php
$data = array(
"monday" => '3000kw',
"tuesday" => '3200kw',
"wednesday" => '3500kw',
"thursday" => '3750kw',
"friday" => '4000kw',
"saturday" => '2800kw',
"sunday" => '3400kw');
foreach($data as $key => $value){
echo "$key: $value <br>\n";
} | true |
2f0777f51380d5fd58956c41e6bafcf97c7b8db5 | PHP | sayanghosh93/phpLoginPage | /register.php | UTF-8 | 2,087 | 2.765625 | 3 | [] | no_license | <?php
$dbhost = 'localhost:3306';
$dbuser = 'root';
$dbpass = '';
$dbname= 'users';
$link = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
if (!$link) {
die('Connect Error (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}
echo 'Success... ' . mysqli_get_host_info($link) . "\n";
mysqli_... | true |
34a026ee629610e6a20af986e87edd7e08465a42 | PHP | didinahmadi/edholcomb-laravel | /app/Http/Controllers/API/TeamController.php | UTF-8 | 1,587 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Resources\TeamResource;
use Illuminate\Http\Request;
use App\Models\Team;
use Illuminate\Support\Facades\DB;
class TeamController extends Controller
{
public function index(Request $request)
{
return TeamReso... | true |
f5ace5f3ed7acf233628aa43a1fd4064d2b141aa | PHP | danishtechverx/danishtest | /wp-content/themes/adventure-tours/woocommerce/includes/reports/WC_Report_ADT_Base.php | UTF-8 | 3,704 | 2.65625 | 3 | [] | no_license | <?php
/**
* Base class for classes related to tour reports functionality.
*
* @author Themedelight
* @package Themedelight/AdventureTours
* @version 2.2.7
*/
class WC_Report_ADT_Base extends WC_Admin_Report
{
public $default_range = 'last_month';
public $allow_any_order_status = false;
/**
* Get th... | true |
aa8986b72eb6c83159b3ba5df947d74f606e601a | PHP | tugtitu/DATNCT | /server/updateTable.php | UTF-8 | 2,318 | 2.75 | 3 | [] | no_license | <?php
include "connect.php";
if (isset($_GET['name']) &&
isset($_GET['idArea']) &&
isset($_GET['id']) &&
isset($_GET['is'])) {
$table_name = $_GET['name'];
$idArea = $_GET['idArea'];
$is = $_GET['is'];
$id = $_GET['id'];
$result = -1;
switch ($is) {
case '0':
... | true |
3a1d5e0cda51d33b8033a4062d250ca608b034aa | PHP | Correcter/targetApi | /Resource/Audience/RemarketingPricelist.php | UTF-8 | 925 | 2.515625 | 3 | [] | no_license | <?php
namespace TargetApi\Resource\Audience;
use TargetApi\Model\Audiences\RemarketingPricelist as RemarketingPricelistModel;
use TargetApi\Resource\AbstaractResource;
/**
* @author Vitaliy Dergunov (<correcter@inbox.ru>)
*/
class RemarketingPricelist extends AbstaractResource
{
/**
* @return object|\Targ... | true |
7cc36a90cb9671862491606d3bf3b3afc7696c3c | PHP | eugene-sukhodolskiy/rating.engine | /fw/kernel/Events.php | UTF-8 | 1,087 | 3 | 3 | [] | no_license | <?php
namespace Kernel;
class Events{
private static $events;
private static $waste;
public static function add($eventname, $callback){
if(!isset(self::$events[$eventname])){
self::$events[$eventname] = [$callback];
return true;
}
self::$ev... | true |
4f4524a2f9b5c6b685d795e1eca4639355abd1b5 | PHP | msawatzky75/WEBD-2006-A5 | /index.php | UTF-8 | 890 | 2.859375 | 3 | [] | no_license | <?php
require('connect.php');
$query = "SELECT * FROM posts ORDER BY id DESC";
$statement = $db->prepare($query); // Returns a PDOStatement object.
$statement->execute(); // The query is now executed.
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My Blog</title>
<link rel="stylesh... | true |
f87e3cb7a865c755c9e8910a163423c978f7114b | PHP | Danielle-Kensy/PHP-Lessons | /aula9tarde/util/validacao.class.php | UTF-8 | 183 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
class Validacao
{
public static function validarNome($valor): bool
{
$expressao = "/^[a-zA-z ]{2,50}$/";
return preg_match($expressao, $valor);
}
}
| true |
91d902d3686ec11309599a4dc6dba582c2483ccf | PHP | ShimpeiMatsuda/e-learning | /contact_me.php | UTF-8 | 1,985 | 2.609375 | 3 | [] | no_license | <?php
require_once 'connect.php';
require_once 'header.php';
if(isset($_POST['send'])){
$name=$_POST['name'].$_POST['lastname'];
$email=$_POST['email'];
$number=$_POST['phone'];
$message=$_POST['message'];
$date=$_POST['date'];
if($name==""or $email=="" or $number=="" or $message=="" or$date==""){
echo "<p cl... | true |
0c2bfa797379e71779047b1d309f5afb4b211903 | PHP | yaseralshikh/talent_project | /app/Http/Livewire/Students.php | UTF-8 | 3,396 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Models\Student;
use App\Models\School;
use Livewire\WithPagination;
use App\Exports\StudentsExport;
use Maatwebsite\Excel\Facades\Excel;
class Students extends Component
{
use WithPagination;
public $sortField = 'name';
public $sortAsc = ... | true |
c97db9fe14d768a9a8e630dd2ff6f3eeef5a6261 | PHP | 66ru/gpor-contrib | /_lib/ezcomponents-2009.2/Document/src/converters/element_visitor/docbook/odt/text_processor.php | UTF-8 | 5,904 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* File containing the ezcDocumentOdtTextProcessor class.
*
* @package Document
* @version 1.3
* @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
* @access private
*/
/**
* Processes text nodes with significant whitespaces... | true |
7dabd2cbc53b08c252f1d30fdb303d11f059dc5a | PHP | vivekkrishna/Smackron | /genderhint.php | UTF-8 | 3,089 | 2.546875 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<?php
// Fill up array with names
session_start();
// Fill up array with names
@$con= mysql_connect("localhost","root","");
//mysql_select_db('employee');
//$rs= mysql_query("select * from emp");
$q1=$_GET["q1"];
if($q1=="any"){
$x=1;
}else{
$x="gender"."="."'".$q1."'";}... | true |
50706f9d9b9dcd02e08681f926b10ecb81bbf0f2 | PHP | ixvil/Symfony.Fit | /src/Service/Sberbank/Client.php | UTF-8 | 1,526 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ixvil
* Date: 01/07/2018
* Time: 12:33
*/
namespace App\Service\Sberbank;
use App\Service\Sberbank\Commands\Command;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\GuzzleException;
class Client
{
/**
* @var ClientInterface
*/
private $client;
... | true |
09072e4b7bc263c1b74dc829e78839d0ae1be564 | PHP | chrisdjsam/smartapp_server_yii | /Neato/protected/models/user/DeviceDetails.php | UTF-8 | 610 | 2.640625 | 3 | [] | no_license | <?php
Yii::import('application.models._base.BaseDeviceDetails');
/**
* User class
*
*/
class DeviceDetails extends BaseDeviceDetails
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return DeviceDetails the static model class
*/
pub... | true |
6bd439d0ee911e7401766b092d431681d070f4d3 | PHP | AboElmagd01/php2 | /login.php | UTF-8 | 1,005 | 2.53125 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>
login
</title>
</head>
<body>
<form action="validate.php" method="post">
<label for="email">email:</label>
<br>
<input type="email"id="email" name="email">
<br>... | true |
bd0a2ce2b63dadef858b0f8c28a7e806211bed7e | PHP | ionutz2k2/snippet-catalog | /app/Decorators/DecoratorInterface.php | UTF-8 | 202 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Decorators;
use Illuminate\Database\Eloquent\Model;
interface DecoratorInterface
{
public function decorateList(array $itemsList);
public function decorate(Model $item);
} | true |