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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
87751da7af669a06c5bf214323a0d63e5ea27aca | PHP | RafaelBlum/Php-conceitos-e-POO | /examples/relacionamento/Luta.php | UTF-8 | 1,678 | 3.09375 | 3 | [] | no_license | <?php
require_once 'Lutador.php';
class Luta {
private $desafiante;
private $desafiado;
public function lutar($l1, $l2){
$this->desafiante = $l1;
$this->desafiado = $l2;
$i = rand(0, 100);
$x = rand(0, 100);
$this->desafiante->forca($i);
$this->desafiado... | true |
601ad076dbb5bd908e0d8eedaa72f6fbba216f82 | PHP | rafaeldowhile/malazap | /vendor/xaamin/whatsapilaravel/src/Clients/WhatsapiMGP25Client.php | UTF-8 | 1,556 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Xaamin\WhatsapiLaravel\Clients;
use Config;
use WhatsProt;
use Xaamin\WhatsapiLaravel\Repository\SMSMessageInterface;
class WhatsapiMGP25Client implements SMSMessageInterface{
/**
* @var string $password
*/
protected $password;
/**
* @var WhatsProt
*/
protected $w... | true |
ff0837efd96cea25a643a66148d864a77c732934 | PHP | alanly/languageleap | /app/tests/Integration/SelectVideo/SelectShowTest.php | UTF-8 | 2,430 | 2.609375 | 3 | [] | no_license | <?php
use LangLeap\TestCase;
use LangLeap\Videos\Video;
use LangLeap\Videos\Show;
class SelectShowTest extends TestCase {
public function setUp()
{
parent::setUp();
// Seed the database.
$this->seed();
}
//1. Go to the Shows panel in the main page
//2. Do some filtering
//3. Select one of the shows
//... | true |
2effcb8790be3f83246802847854974c6b7dc7a9 | PHP | Ashishshill/E-Commerce_With_OOP_PHP_-_Sqli | /class/Payment.php | UTF-8 | 8,397 | 2.609375 | 3 | [] | no_license | <?php
$filepath = realpath(dirname(__FILE__));
include_once ($filepath."/../lib/Database.php");
include_once ($filepath."/../helpers/Format.php");
?>
<?php
class Payment{
private $db;
private $fm;
public function __construct() {
$this->db = new Database();
$this->fm = ne... | true |
b8377292c0006f83adb6e53b51b7d6341c29b9a3 | PHP | DinaSri/latihanoop | /konstruktor.php | UTF-8 | 660 | 3.234375 | 3 | [] | no_license | <?php
//class
class robot{
//property
public $suara ;
public $berat ;
public $kegunaan ;
//konstruktor
public function __construct($suara, $berat,$kegunaan){
$this->suara =$suara;
$this->berat =$berat;
$this->kagunaan =$kegunaan;
}
//metode set dan get
public function set_suara($suara){
$this->suara ... | true |
8d327d7a0bd3770b876c3f10da12a3a2cc08aaa1 | PHP | amberovsky/avaritia | /source/server/src/Model/Executor/ExecutorRepository.php | UTF-8 | 10,268 | 2.609375 | 3 | [
"MIT"
] | permissive | <?
/**
* @author amberovsky
*
* Репозиторий исполнителя
*/
namespace Avaritia\Model\Executor\ExecutorRepository;
load('Avaritia\Library\Memcached\Memcached');
load('Avaritia\Model\Executor\Executor');
load('Avaritia\Library\Mysql\MysqlFactory');
load('Avaritia\Library\Mysql\Mysql');
load('Avaritia\Library\Passwor... | true |
b0ea80588c8f71d2633568d5134e1be778502462 | PHP | sbarbat/BeeGame | /src/Characters/Hive/Hive.php | UTF-8 | 1,580 | 3.25 | 3 | [] | no_license | <?php
namespace Sbarbat\Chip\Characters\Hive;
use Sbarbat\Chip\Characters\InsectInterface;
use Sbarbat\Chip\Characters\Bee\Queen;
use Sbarbat\Chip\Characters\Bee\Worker;
use Sbarbat\Chip\Characters\Bee\Drone;
class Hive implements HiveInterface
{
private $bees;
public function __construct(int $workersNumber... | true |
18186fe6cfe80b89dc5cf96191803999fa51ceca | PHP | icepho/pdding-robot | /src/Messages/Types/Support/Link.php | UTF-8 | 500 | 2.890625 | 3 | [] | no_license | <?php
namespace Aping\PddingRobot\Messages\Types\Support;
class Link
{
use LinkTrait;
/**
* Link constructor.
*
* @param string $title
* @param string $messageUrl
* @param string $picUrl
*/
public function __construct(string $title,
string $me... | true |
fbb55205f80ed5e9833a492c6e20816d27d14c4f | PHP | FernandoLlallire/PracticaDH | /php/Clase 2/ejercicio9.php | UTF-8 | 61 | 2.71875 | 3 | [] | no_license | <?php
$numero=3;
echo $numero%2==0? "Es par":"Es impar";
?>
| true |
55b0c3649e7845abb3b09b2c2c8bdcd1cd0802c8 | PHP | ThuThuy96/ajax_by_me | /ajax.php | UTF-8 | 1,088 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Admin
* Date: 11/12/2018
* Time: 09:49
*/
require_once 'database.php';
$db = new Database();
$offset = isset($_POST['offset']) ? $_POST['offset'] : 0; /*cú phấp viết tắt của lệnh if*/
$limit = isset($_POST['limit']) ? $_POST['limit'] : 0;
$conn = Database::$connection;
$sq... | true |
c3a298a9f5ab0a8fade94d0648fce32c8281b26c | PHP | Maras0830/laravel5-twitch-api | /src/Core/Chat.php | UTF-8 | 1,679 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Maras0830\TwitchApi\Core;
use GuzzleHttp\Client;
/**
* Class Chat
* @package Maras0830\TwitchApi\Core
*/
class Chat extends Base
{
/**
* Returns a links object to all other chat endpoints.
*
* @param $channel
* @return mixed
*/
public function chatChannel($channel... | true |
82bed1a78a79120ba851676c762a048464e31575 | PHP | dilrubaahmed12/Institute-Management-System | /app/Student/Student Details/Batch-wise Student List/ViewBatch.php | UTF-8 | 2,674 | 2.578125 | 3 | [] | no_license | <?php
include $_SERVER['DOCUMENT_ROOT']."/RMS/config/db.php";
include $_SERVER['DOCUMENT_ROOT']."/RMS/inc/header.php";
?>
<br>
<div class="container-fluid">
<div class="container col-md-8">
<div class="card">
<!-- Student List -->
<div class="card-header">Student List:</div>... | true |
4f9b7a027b546bb4e5f4adf44598d8ee894aece3 | PHP | Iyamoto/bot-template | /filter.php | UTF-8 | 862 | 2.953125 | 3 | [] | no_license | <?php
/*
* Filter one run activity to daily data
*/
$exec_time = microtime(true);
require_once 'config.php';
require_once 'functions.php';
echo "\n[+] Started\n";
//Read one_run
$one_run = read_db_from_file($db_file);
if ($one_run) {
$one_run_size = sizeof($one_run);
echo "[+] Read $one_run_size blocks from... | true |
d7bc3e42181a55cd582d8d6ce13ef8cd006f29fe | PHP | leonardoivo/Trilhos-Do-Rio | /Acervo/Documentos/EditarDocumentos.php | UTF-8 | 1,261 | 2.546875 | 3 | [] | no_license | <?php
include("../../config.php");
$id_documento=" ";
if(isset($_GET['id_documento'])){
$id_documento=$_GET['id_documento'];
}
$QueryResultado = "select id_documento, nome_documento, Descricao, dataDeCadastramento FROM documentos where id_documento='".$id_documento."'";
$query=mysqli_query($link,$QueryResultado)... | true |
81cd6fb5ecfb2249aae401c9604453f4a94ebe1b | PHP | adayguerra/cloud-run-wordpress | /wordpress/wp-content/plugins/leadin/src/admin/api/class-apimiddlewares.php | UTF-8 | 742 | 2.796875 | 3 | [
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-copyleft"
] | permissive | <?php
namespace Leadin\admin\api;
use Leadin\wp\User;
/**
* Contains all the middleware functions for AJAX Api's
*/
class ApiMiddlewares {
/**
* Middleware used to validate the nonce passed with the request body.
* The nonce has to be passed as a `_ajax_nonce` query parameter, and it will be checked against t... | true |
78f7ec1d3baef96f4200bbd6073ee523663753be | PHP | ebavery/ConwayGameOfLife | /universe.php | UTF-8 | 1,922 | 3.03125 | 3 | [] | no_license | <?php
/*
* CONTROLLER--RUN PROGRAM FROM THIS FILE
*/
/** *
* universe.php collects the file from the user and sends it to the models for processing
*
* VIEW is below
*
* Author: Elizabeth Avery
* Date: 05/02/2017
*/
require_once('UniverseDataModel.php');
require_once('UniverseFileModel.php');
$message =... | true |
6b9bc355cc1f604066e66fc499c834d7f9e749a6 | PHP | burbes/360sportsbar | /Admin/models/Login.php | UTF-8 | 932 | 2.75 | 3 | [] | no_license | <?php
/*
* ***********************************************
* Objetivo: Classe com methodos para retornar
* os dados dos usuários
*
* Created on : 20/02/2014
* Author : Naelson Matheus Jr
*
* ***********************************************
* Updates
*
* Created on : ... | true |
69ae301df6b4f8f888d6538c1a4667d68c8718a6 | PHP | felipemjesus/laravel-apirest-vuejs | /test1/src/BalancedBrackets.php | UTF-8 | 843 | 3.515625 | 4 | [] | no_license | <?php
declare(strict_types=1);
namespace Test1;
class BalancedBrackets
{
private const BRACKETS = ['(' => ')', '{' => '}', '[' => ']'];
/**
* @param string $text
* @return bool
*/
public function validate(string $text): bool
{
$bracketsOpen = array_flip(self::BRACKETS);
... | true |
44becd9b341499ef854a2eba0c3912df3e628861 | PHP | fenric/web-frameworks | /php/unic/system/core/Globals.php | UTF-8 | 5,480 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Global
* Global variables and methods.
*
* @package : Global
* @category : System
* @author : Unic Framework
* @link : https://github.com/unicframework/unic
*/
if(file_exists(SYSPATH.'/core/Security.php')) {
require_once SYSPATH.'/core/Security.php';
} else {
http_response_code(500);
exit('Error : sy... | true |
ca5a1ef3ef227150aca4c33812e4afc9696b9ac4 | PHP | NgoDucHai/spy-tool | /app/controllers/BonanzaController.php | UTF-8 | 6,012 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: anhdt
* Date: 2/10/2018
* Time: 12:22 PM
*/
use Illuminate\Http\Request;
class BonanzaController extends BaseController {
private $_bonanza_helper;
/**
* Show the profile for the given user.
*/
public function __construct() {
ini_set('max_... | true |
fdfa9b40a7b918b1fbeb3e8ae58ddefbd811c1d6 | PHP | neraath/ioc-php-talk | /library/IocExample/Notifier/EmailNotifier.php | UTF-8 | 1,072 | 2.96875 | 3 | [] | no_license | <?php
/**
* IoC Example Code
*
* Used for helping to present about IoC in PHP.
*
* @author Chris Weldon <chris@chrisweldon.net>
*/
namespace IocExample\Notifier;
use \IocExample\Notifier\Interfaces\INotifier,
\IocExample\Model\Customer,
\IocExample\Model\Order;
class EmailNotifier implements INotifier
{... | true |
d73c9cb317959525447c117ef84aadf9ccbe1a68 | PHP | midhunbabu/online-shopping | /onlineshopping/models/TblStatus.php | UTF-8 | 1,029 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "tbl_status".
*
* @property integer $pk_int_status_id
* @property string $vchr_status
*
* @property TblOrderDetailStatus $tblOrderDetailStatus
*/
class TblStatus extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
p... | true |
3cbc1f759a0aa0652f4338bf26684f83e98829e7 | PHP | Den22/cocua.local | /validators/AbstractValidator.php | UTF-8 | 537 | 2.703125 | 3 | [] | no_license | <?php
namespace Application\Validators;
abstract class AbstractValidator
{
protected $Filters;
protected $ErrorsMessage;
public $disparity;
public $inputs;
public function checkForm()
{
$this->inputs = filter_input_array(INPUT_POST, $this->Filters);
foreach ($this->inputs as... | true |
22108afca4927a678ba6b1f3f9647d4437b8992d | PHP | marcelotebeo/marcelotebeo2 | /philsite/updateuser.php | UTF-8 | 1,413 | 2.6875 | 3 | [] | no_license | <?php
include_once('config.php');
if(isset($_POST['updateuser'])){
$id = $_POST['id'];
$username=$_POST['username'];
$password=$_POST['password'];
$role=$_POST['role'];
// checking empty fields
if(empty($username) || empty($password) || empty($role)) {
if(empty($username)) {
echo "... | true |
e48859ec3e0c70b7174910bf0a50f41c8f49a8be | PHP | simonclement08/caesar_palace | /enigme_final.php | UTF-8 | 2,459 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset= »utf-8» />
<link rel="stylesheet" href="style.css" />
<title>Escape game</title>
</head>
<body>
<header>
<h1>Soirée au Caesars Palace</h1>
</header>
<?php
require "connexion.php";
$bdd = c... | true |
7bacb0d7c82ba37fbbcd3d05af4caa9b9f092d5e | PHP | adumontois/formation | /lib/vendors/FormBuilder/CommentFormBuilderWithAuthor.php | UTF-8 | 736 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: adumontois
* Date: 17/10/2016
* Time: 12:25
*/
namespace FormBuilder;
use OCFram\NotNullValidator;
use OCFram\StringField;
/**
* Class CommentFormBuilderWithAuthor
*
* Formulaire de commentaires avec auteur.
*
* @package FormBuilder
*/
class CommentFormBuilderWith... | true |
f047dabcee1cc63adc98a0c252a666b58d3a82b6 | PHP | ingpetrsvoboda/projektor2 | /Projektor2/Response.php | UTF-8 | 961 | 2.90625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Response
*
* @author pes2704
*/
class Projektor2_Response {
protected $cookies = array();
protected $body;
public function setCookie($name, $value=NULL,... | true |
ed979a9cff620181ba38c0f3de2f97e56671296d | PHP | efloresp17/prueba | /Negocio/ManejoReservation.php | UTF-8 | 5,032 | 2.890625 | 3 | [] | no_license | <?php
/**
* Import classes
*/
require_once ($_SERVER["DOCUMENT_ROOT"]).'/proyectoLibreria/Persistencia/ReservationDAO.php';
require_once ($_SERVER["DOCUMENT_ROOT"]).'/proyectoLibreria/Persistencia/Util/Conexion.php';
class ManejoReservation{
/**
* Atribute for t... | true |
c0a116f5534d7d1038e972cbbbbb9430debba42b | PHP | Victorzsg/Viswoole | /lib/Viswoole/Controller/TcpController.php | UTF-8 | 1,072 | 2.703125 | 3 | [] | no_license | <?php
namespace Viswoole\Controller;
/**
* TcpServer请求处理类
*/
class TcpController {
/**
* 请求数据入队
* @param type $db
* @param type $data
* @return type
*/
public static function InsQueueData($db, $data) {
$output = $db->push(LIST_QUEUE, $data);
return $output;
}
... | true |
198a266caeb606249d20657301c8bf6a38962193 | PHP | nmartosg/m7noeliamartos | /UF1-A8-Password Recovery/changepassword.php | UTF-8 | 3,879 | 2.640625 | 3 | [] | no_license | <?php
include("funcions.php");
$errors=false;
$error="";
$errorpassword="";
$errorpasswordRepetida="";
$codi=$_GET["codi"];
$data1= new DateTime(GetDataLink($codi));
$data2=new DateTime(date('Y-m-d H:i:s'));
$dteDiff=$data1->diff($data2);
$diferenciaTemps= $dteDiff->format("%H");
if($diferenciaTemps>... | true |
94b6cf2fea9ff1eb10091348008f0a363ff2178c | PHP | crieger/Monitoring | /src/ajax-script.php | UTF-8 | 4,067 | 2.640625 | 3 | [] | no_license | <?php
/*
* Copyright (C) 2014 Christophe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is... | true |
090b844262a66801e4a56c8614ecace0a1b112df | PHP | wyhw/certificate | /web/app/Student.php | UTF-8 | 799 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Student extends TermModel
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', //姓名 30
'classroom', //班级 50
'sex', //性别 2
'idcard', //身份证 18
'education', //学历
'subjects',
'schoolte... | true |
6b1ba7d91d6078e6b7f62fe4bd23a6ce76d34ec3 | PHP | jedi4z/php-state-pattern | /usuario/UsuarioActivo.php | UTF-8 | 259 | 2.59375 | 3 | [] | no_license | <?php
class UsuarioActivo implements UsuarioEstado{
public function publicarPost(){
echo 'Se ha publicado su posts con exito.</br>';
}
public function verPosts(){
echo 'El usuario ESTA VIENDO DISTINTOS POSTS.</br>';
}
} | true |
b6cff05f21674add66222bd2ff3489b9c4ad1429 | PHP | Almamu/tautulli-db-statistics-display | /src/Almamu/DataProviders/TautulliAPI.php | UTF-8 | 12,704 | 2.75 | 3 | [] | no_license | <?php
namespace Almamu\DataProviders;
use Almamu\Connectors\TautulliAPI as Connector;
use Almamu\Data\Metadata;
use Almamu\Data\MostPlayed;
use Almamu\Data\PlayTime;
class TautulliAPI implements DataProvider
{
/** @var Connector The api connector to read data from */
privat... | true |
e3d8d2a04abb7b7cdbf50a6ee6ef89b2b96a8ebd | PHP | anwarien/trentchat | /src/AppBundle/Repository/MessageRepository.php | UTF-8 | 1,057 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Trent
* Date: 8/28/2019
* Time: 3:48 PM
*/
namespace AppBundle\Repository;
use AppBundle\Entity\Message;
use AppBundle\Entity\User;
use AppBundle\Entity\Room;
use Doctrine\ORM\EntityRepository;
class MessageRepository extends EntityRepository
{
/**
* @param U... | true |
ca771bfeb763abed8ed3c859947156c02d610195 | PHP | KamishiroIyamoto/RegS | /core/includes/sign.php | UTF-8 | 1,543 | 2.625 | 3 | [] | no_license | <?php
require($_SERVER["DOCUMENT_ROOT"]."/RegS/core/lib/DataBase.php");
require($_SERVER["DOCUMENT_ROOT"]."/RegS/cfg/config.php");
$userEmail = $_POST["email"] ?? NULL;
$userPassword = $_POST["password"] ?? NULL;
$userUsername = $_POST["username"] ?? NULL;
$dataBaseHandler = new DataBase(HOST_NAME, USER_NAME, PASSWORD... | true |
a5d5ec767993ec96ce8158a72ad5a1a7bc069a5a | PHP | guna681/zigjekbackend | /gojek-backend-laravel/database/migrations/2020_09_11_035307_create_transaction_table.php | UTF-8 | 982 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTransactionTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transaction', function(Blueprint $table)
{
$table->bigInteger('Id', tru... | true |
de5065a0fb58da4cfc0ab89e38e279ec4f44a683 | PHP | SotoLtd/easl | /plugins/total-theme-core/inc/wpbakery/map/vcex-contact-form.php | UTF-8 | 1,346 | 2.578125 | 3 | [] | no_license | <?php
namespace TotalThemeCore\WPBakery\Map;
use \VCEX_Contact_Form_Shortcode;
defined( 'ABSPATH' ) || exit;
/**
* Class registers the vcex_contact_form shortcode with the WPBakery page builder.
*
* @package TotalThemeCore
* @version 1.3
*/
final class Vcex_Contact_Form {
/**
* Instance.
*
* @access priv... | true |
5c2eaaa39d39d7c31927e26fd567c024098b0e1a | PHP | ByronMorley/aqua | /code/ActivityGroup/Activities/Pairs/ActivityPairs.php | UTF-8 | 579 | 2.515625 | 3 | [] | no_license | <?php
class ActivityPairs extends Activity
{
private static $db = array(
'Question' => 'HTMLText'
);
private static $has_one = array();
private static $has_many = array(
'Pairs' => 'Pair',
'Singles' => 'Singular',
);
public function leftSide()
{
return Singular::get()->filter(array('Side' => 'left',... | true |
9be024715a13f606b4c3685d879716c46f729525 | PHP | movablebrains/recommendwp-shortcodes | /lib/luminance.php | UTF-8 | 834 | 3.546875 | 4 | [] | no_license | <?php
/**
* Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7
* @param str $hex Colour as hexadecimal (with or without hash);
* @percent float $percent Decimal ( 0.2 = lighten by 20%(), -0.4 = darken by 40%() )
* @return str Lightened/Darkend colour as hexadecimal (with hash... | true |
a5c25538909a053da63e691f79701e51ef5b9953 | PHP | pmSven/pm-shopware-base-project | /src/public/custom/plugins/PmLogging/Components/Logging/LoggingService.php | UTF-8 | 3,009 | 2.859375 | 3 | [
"Apache-2.0",
"AGPL-3.0-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
/**
* Created by PhpStorm.
* User: pmSven
* Date: 30.04.20
* Time: 21:32
*/
namespace PmLogging\Components\Logging;
use Doctrine\Common\Util\Debug;
use Doctrine\ORM\EntityManagerInterface;
use InvalidArgumentException;
use PmLogging\Models\Logging\Helper\LoggingType;
use PmLogging... | true |
d0700503e683d02f5af27b44d2a251904877579b | PHP | Marutho/Mongo-Solr-PostgreDBs | /vendor/mongodb/mongodb/src/MongodbQueries.php | UTF-8 | 1,114 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
//tiempo de 5 minutos para que se hagan todas las queries
ini_set('max_execution_time', 300);
set_time_limit(300);
require_once('MongoDB.php');
echo joinQuery();
class Mqueries{
function simpleQuery()
{
}
function joinQuery() //con esta query uniremos u... | true |
d7513531e465f20100d6071552f2f095ceea72d4 | PHP | krusha2110/Front-end | /components/Register.php | UTF-8 | 1,621 | 2.5625 | 3 | [] | no_license | <?php
include 'DatabaseConnection.php';
$fname = $conn->real_escape_string($_REQUEST['fname']);
$lname = $conn->real_escape_string($_REQUEST['lname']);
$gender = $conn->real_escape_string($_REQUEST['gender']);
$email = $conn->real_escape_string($_REQUEST['email']);
$password = $conn->real_escape_string($_REQUEST['psw']... | true |
bb201e862247d667596978f5c2a2e027f3fe7d4b | PHP | msamaae/PHP-grouptaskC | /classes/erroruser.class.php | UTF-8 | 1,918 | 3.0625 | 3 | [] | no_license | <?php
class Erroruser extends User
{
public function displayError($err)
{
if ($err == "emptyfields") {
echo '<h4 class="text-warning">Fill in all fields</h4>';
} elseif ($err == "invalidmailusername") {
echo '<h4 class="text-danger">Invalid format of use... | true |
1bcfbe25e5d624632d5c1a32eff31311eb1098d6 | PHP | troelslenda/laravel-todos | /web/app/Todo.php | UTF-8 | 867 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Todo extends Model
{
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $table = 'todos';
protected $fillable = [
'name',
'completed',
];
/**
* Save mo... | true |
e86b8ef9f988f775091202b404d2a762a76d71e7 | PHP | diegoclair/WebDeveloperCourse | /008-PHP/002_curso_php/desconto/desconto.php | UTF-8 | 821 | 2.96875 | 3 | [] | no_license | <?php
//require_once significa que estamos requerendo esse arquivo php. Ele serve como se a pagina funcoes_desconto.php estivesse aqui dentro do cógido, então podemos chamar as funções da outra página normalmente.
//se a função abaixo estivesse em alguma pasta, exemplo funcao, teria que colocar: 'funcao/fu... | true |
5514567251a97f2fead0e02fe5ad528c4bc7bb8d | PHP | FerCar1999/sgcs | /app/models/TipoUsuario.php | UTF-8 | 2,051 | 3.09375 | 3 | [] | no_license | <?php
class TipoUsuario extends Validator
{
// Declaraion de propiedades
private $codi_tipo_usua = null;
private $nomb_tipo_usua = null;
private $esta_tipo_usua = null;
// Encapsulamiento de codigo de categoria
public function setCodiTipoUsua($value)
{
//validando de... | true |
b72df63d14d456977dbcc58db7e3c88f5dcc5686 | PHP | phacility/arcanist | /src/lint/linter/xhpast/rules/ArcanistUnnecessarySymbolAliasXHPASTLinterRule.php | UTF-8 | 1,118 | 2.671875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class ArcanistUnnecessarySymbolAliasXHPASTLinterRule
extends ArcanistXHPASTLinterRule {
const ID = 99;
public function getLintName() {
return pht('Unnecessary Symbol Alias');
}
public function getLintSeverity() {
return ArcanistLintSeverity::SEVERITY_WARNING;
}
public function pro... | true |
d7df73617560534690121c9d2ff0949c8d9bca3e | PHP | spacegoing/ITHeiMa | /课堂笔记/day02/day-1/02-上课代码/0522/08_printf.php | UTF-8 | 337 | 3.625 | 4 | [] | no_license | <?php
// 声明三个变量
$name = '小陈';
$home = 'hongkong';
$age = 33;
// 我想输出
// my name is , i come from ,i am years old
printf("my name is %s,i come from %s,i am %d years old",$name,$home,$age);
// 可以用 echo 语句使用
echo '<br>',"my name is $name,i come from $home,i am $age years old";
?> | true |
cd88e51c75a2b56be806e57914e6ab26d0164b64 | PHP | hellopablo/related-content | /tests/TestCases/EngineTest/QueryTest.php | UTF-8 | 8,697 | 2.59375 | 3 | [] | no_license | <?php
namespace Tests\TestCases\EngineTest;
use ArgumentCountError;
use HelloPablo\RelatedContent\Engine;
use HelloPablo\RelatedContent\Exception\NotConnectedException;
use HelloPablo\RelatedContent\Interfaces;
use PHPUnit\Framework\TestCase;
use Tests\Mocks;
use Tests\Traits;
use TypeError;
/**
* Class QueryTest
... | true |
dc41cc0cb3b1c062b503943de38e421b7bd5a0a0 | PHP | cristianoc72/icon-button | /src/IconButtonTypeExtension.php | UTF-8 | 1,810 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* This file is part of the icon-button package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
namespace cristianoc72\IconButton;
use Symfony\Component\Form\AbstractTypeExtension;
use Symfony\Comp... | true |
e69d3168e4bc806786578d225b39dc2c6d05835a | PHP | elden43/advent2019 | /app/Presenters/Day1Presenter.php | UTF-8 | 1,181 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Presenters;
final class Day1Presenter extends BasePresenter
{
public function renderPuzzleResult(): void {
$this->template->firstPuzzleResult = $this->firstPuzzleResult();
$this->template->secondPuzzleResult = $this->secondPuzzleResult();
}
private function first... | true |
4601dd0eed7b8c40e064db3e3c063de471d731af | PHP | danielsdeboer/prefixed-number | /src/Interfaces/Parser.php | UTF-8 | 120 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Aviator\Values\Interfaces;
interface Parser
{
public function __invoke (string $string): array;
}
| true |
1a331124b2b60706f48f288084ee44df90fbc9e3 | PHP | jcrb/Sagec | /classes/dao/veille/.svn/text-base/Acte.class.php.svn-base | ISO-8859-1 | 614 | 2.640625 | 3 | [] | no_license | <?php
require_once $BackToRoot."classes/objet/import/RpuActe.class.php";
/**
* Acces aux donns pour les actes codes en CCAM
*
* @package Dao_Veille
* @copyright Copyright (C) 2003 (Jean-Claude Bartier)
* @license GNU General Public License
* @author NOLDDOMI
*
*/
class Dao_Veille_Acte{
/**
* ... | true |
c19e227c4b29a443aa1153e21d36f6d25ffe79d4 | PHP | daisuke1101/test | /selfphp_2/5/strtolower.php | UTF-8 | 501 | 3.109375 | 3 | [] | no_license | <?php
print strtolower( 'WINGSプロジェクト' ) . '<br />'; // 大文字をすべて小文字に変換
print strtoupper( 'wingsプロジェクト' ) . '<br />'; // 小文字をすべて大文字に変換
print lcfirst( 'WINGS PROJECT' ) . '<br />'; // 文字列の1文字目を小文字に変換
print ucfirst( 'wings project' ) . '<br />'; // 文字列の1文字目を大文字に変換
print ucwords( 'wings project' ) . '<br />'; // 単語の... | true |
6ceaf3397fb3a433165d69984d1add5b8c663a01 | PHP | shadhin-msa/cv_creator | /app/Http/Controllers/SocialController.php | UTF-8 | 2,513 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Social;
use Illuminate\Http\Request;
class SocialController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$socials = social::all();
... | true |
8982908c96b2f8739617d5ca9ff641dcea2d9741 | PHP | Ranjith786/ran-2305 | /notes/notes_edit_submit.php | UTF-8 | 1,473 | 2.609375 | 3 | [] | no_license |
<!DOCTYPE html>
<html lang="en">
<head>
<title>Ranjith's Dashboard</title>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="../css/dashboard.css">
<script type="text/javascript" language="javascript" src="../js/dashboard.js"></script>
<?php include '../common/util_functions.php';?>
</head>
... | true |
24d7626b27da88bf4679463b531f9dd003e5056b | PHP | unbywyd/wordpress-custom-menus | /unbywyd-custom-menus.php | UTF-8 | 6,919 | 2.75 | 3 | [] | no_license | <?php
/*
Plugin Name: Unbywyd custom menus
Version: 0.1
Author: Unbywyd
Author URI: unbywyd.com
*/
/*
* We will use the Handlebars template engine
*/
if(!class_exists('LightnCandy\LightnCandy')) {
require_once ("handlebars/autoload.php");
}
use LightnCandy\LightnCandy;
define('UCMS_DIR', plugin_dir_path(__FILE__... | true |
a27010991eb85bb66d5673687328f5264786b6f4 | PHP | ultr4m4n/lanayapr | /app/User.php | UTF-8 | 1,714 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Database\Eloquent\Model;
class User extends Authenticatable
{
use Notifiable;
// use Model;
/**
* The attributes that are mass assignable.
*
* @var array
... | true |
92c67571e302c5ff3d579fc55f737b39ffb37359 | PHP | milos-pejovic/italib | /app/libraries/Hash.class.php | UTF-8 | 747 | 3.296875 | 3 | [] | no_license | <?php
/**
* Used for encoding data.
* This class is used in models for encoding passwords before sending
* them to database.
*/
class Hash {
/**
* create - Encodes a string.
*
* @param string $alg - Algorhythm to use for encoding.
* @param string $data - String to encode.
* @param c... | true |
404ddcaf4217dc1ecce99dd20f7ca035e8b690d1 | PHP | antontrey/laravel-react | /app/Models/Bookgroup.php | UTF-8 | 682 | 2.5625 | 3 | [] | no_license | <?php namespace App\Models;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
class Bookgroup extends Mmb {
protected $table = 'booking_groups';
protected $primaryKey = 'group_id';
public function __construct() {
parent::__construct();
}
public static function querySelect( ){
... | true |
c07c53b1ba21ac55a7f0863ebc26974971bd999b | PHP | danlangford/buttonmen | /test/src/engine/BMBtnSkillGordoTest.php | UTF-8 | 4,002 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class BMBtnSkillGordoTest extends PHPUnit_Framework_TestCase {
/**
* @covers BMBtnSkillGordo::are_unique_swing_values_valid
*/
public function testAre_unique_swing_values_valid() {
$die1 = BMDieSwing::create('V');
$die2 = BMDieSwing::create('W');
$die3 = BMDieSwing::cre... | true |
c426a405f82cacbb0b033431a067bb6a2ec75744 | PHP | HelloWorldDev/api-service | /src/Being/Services/App/FindService.php | UTF-8 | 3,958 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Being\Services\App;
use Being\Api\Service\Code;
use Illuminate\Support\Facades\Redis;
class FindService
{
protected static function getFindByMobileLockCacheKey($mobile)
{
return 'being:find:lock:mobile:' . $mobile;
}
protected static function getFindByMobileVerifyCodeCacheKey... | true |
0e5db1532e69401379ae90f17bea740c71531dae | PHP | standardebooks/web | /lib/Exceptions/WebhookException.php | UTF-8 | 229 | 2.734375 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | <?
namespace Exceptions;
class WebhookException extends AppException{
public $PostData;
public function __construct(string $message = '', string $data = null){
$this->PostData = $data;
parent::__construct($message);
}
}
| true |
405555b90664cc597bef7c4de757dba1b89a59de | PHP | laura-ur/bankas | /bank/new_account.php | UTF-8 | 2,101 | 2.78125 | 3 | [] | no_license | <?php
require __DIR__ . '/bootstrap.php';
//NAUJAS KLIENTAS
if ('POST' == $_SERVER['REQUEST_METHOD']) {
_d($_POST['submit']);
$newArray = [];
if (isset($_POST['vardas'])) {
$newArray['vardas'] = $_POST['vardas'];
}
if (isset($_POST['pavarde'])) {
$newArray['pavarde'] = $_P... | true |
aabbdf1267d5fb9b28186b85e425c397a2812fbe | PHP | FernandoIsco/myBlog | /app/api/controller/Common.php | UTF-8 | 1,238 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/3/1
* Time: 10:44
*/
namespace app\api\controller;
use app\api\model\BaseModel;
class Common extends Api
{
protected $models;
/**
* 获取模型
* @param string $model 模型名称
* @return mixed
*/
publ... | true |
04f90785bd976fdfc72922a647a8f08713ef6817 | PHP | netzmensch/hurricane | /tests/classes/contentTest.php | UTF-8 | 1,031 | 2.71875 | 3 | [] | no_license | <?php
namespace redcross\hurricane\tests\classes;
use redcross\hurricane\classes\content;
class contentTest extends \PHPUnit_Framework_TestCase
{
/**
* @covers \redcross\hurricane\tests\classes\content::setContent
* @covers \redcross\hurricane\tests\classes\content::getContent
*/
public functio... | true |
8a68241fe0341c0d3bc3d152178365b2a862fb90 | PHP | tomasgiordano/TP_Laboratorio_Programacion_3 | /TP/mostrar.php | UTF-8 | 808 | 2.71875 | 3 | [] | no_license | <?php
require_once("./clases/fabrica.php");
$EmpleadoString = array();
$e;
$ar = fopen("archivos/empleados.txt", "r");
while(!feof($ar))
{
$EmpleadoString = explode('-',fgets($ar),7);
$EmpleadoString[0]=trim($EmpleadoString[0]);
if($EmpleadoString[0]==""){
... | true |
003d841fb2d75aedb9f098cde2a311fa5b016ec5 | PHP | diversifiedtech/omnipay-nuvei | /tests/AchTest.php | UTF-8 | 17,722 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Omnipay\Nuvei;
use Omnipay\Common\Exception\InvalidRequestException;
use Omnipay\Nuvei\Ach;
use Omnipay\Tests\TestCase;
class AchTest extends TestCase
{
/** @var Ach */
private $ach;
public function setUp() : void
{
$this->ach = new Ach;
$this->ach->setRoutingNumber('... | true |
d52eb3a44322fb910679141e5c64afe56320c34b | PHP | joussyd/facebook | /src/Graph.php | UTF-8 | 1,556 | 2.796875 | 3 | [] | no_license | <?php
/**
* This file is part of the Compos Mentis Inc.
* PHP version 7+ (c) 2017 CMI
*
* Copyright and license information can be found at LICENSE
* distributed with this package.
*
* @category Class
* @package Class
* @author Joussyd Calupig <joussydmcalupig@gmail.com>
* @license http://www.gnu.org/copy... | true |
c91ca841e79dbc75d4b59e82abd7e1a9c7ab9f50 | PHP | ErickDomingues/DESIGN-PATTERNS | /src/DesignPatterns/FormGenerator/Campos/Tipos/CampoSelect.php | UTF-8 | 874 | 2.796875 | 3 | [] | no_license | <?php
namespace DesignPatterns\FormGenerator\Campos\Tipos;
class CampoSelect extends \DesignPatterns\FormGenerator\Campos\Campo{
private $opcoes = array();
function getOpcoes() {
return $this->opcoes;
}
function setOpcoes($opcoes = array()) {
$this->opcoes = $opcoes;
... | true |
d9223334f2dc6d32784530a1ef16bf2baf78c504 | PHP | nguyenbaongoctq266/baongoc | /php/lop.php | UTF-8 | 1,713 | 2.734375 | 3 | [] | no_license | <?php
$conn = new mysqli('localhost','root','','thanhvien') ;
?>
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Đăng kí</title>
</head>
<body>
<h1>Nội Dung</h1>
<div id="noidung">
<table width="28%">
<tr>
<th>STT</th>
<th>Tên Sinh Viên</th>
<t... | true |
280a62b5d16249c8368dd91890f7f22eae91f5f3 | PHP | candicejoyballarta/movie-flix | /app/Http/Controllers/RoleController.php | UTF-8 | 3,242 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Role;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class RoleController extends Controller
{
protected $rules = [
'role_name' => 'required|max:45',
'movie_id' => 'required',
'actor_id' => 'required'
];
prot... | true |
9803bb6a2be5f772d3fc2da1801a903c0bd35f0f | PHP | reethree/wms-ptsg | /app/Models/Eloquent/EloquentLokasisandar.php | UTF-8 | 2,473 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Models\Eloquent;
class EloquentLokasisandar {
/**
* Lokasisandar Eloquent Model
*
* @var Lokasisandar
*
*/
protected $Lokasisandar;
public function __construct()
{
$this->Lokasisandar = new \App\Models\Lokasisandar();
}
/**
* Creates a new r... | true |
176a2e49aa6099f5053995d89f195c98db3fe6a7 | PHP | netonneettoo/projeto-pratico-web | /database/seeds/WorkTableSeeder.php | UTF-8 | 1,163 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class WorkTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$edition = array('First edition', 'Second edition', 'Third edition', 'Fourth edition', 'Fifth edition', 'Sixth edition', 'Seven... | true |
b43b2edb050ead16944a9e0bf847d79366c42777 | PHP | B-Amrita/RockPaperScissor | /GameFunctions.php | UTF-8 | 2,312 | 3.53125 | 4 | [] | no_license | <?php
//back-end functionality of game
function functionPlayer($userInput) {
//echo "please choose between the following: R for Rock, P for Paper or S for Scissors. Press X to quit";
//$player=stream_get_line(STDIN, 100, PHP_EOL);
switch ($userInput) {
case "R":
$userInput = "Rock";
... | true |
d31c66f1a771b09d133dc7d98aa95e25763327b2 | PHP | WalkWeb/Battle-Module | /tests/Battle/Unit/Ability/Effect/ReserveForcesAbilityTest.php | UTF-8 | 22,110 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Tests\Battle\Unit\Ability\Effect;
use Battle\Action\ActionCollection;
use Battle\Action\ActionInterface;
use Battle\Action\BuffAction;
use Battle\Command\CommandFactory;
use Battle\Command\CommandInterface;
use Battle\Container\Container;
use Battle\Container\ContainerInterfa... | true |
349f44e541ab8b6ba13c5d1319658bfb82d38d3b | PHP | pacetravels247/Mobile_Development | /agent/application/models/transaction.php | UTF-8 | 5,918 | 2.6875 | 3 | [] | no_license | <?php
/**
* Library which has generic functions to get data
*
* @package Provab Application
* @subpackage Flight Model
* @author Balu A<balu.provab@gmail.com>
* @version V2
*/
Class Transaction extends CI_Model
{
/**
* Lock All the tables necessary for flight transaction to be processed
... | true |
cc55ebec0c13ee6beda5a7abc9de62b5ae770f83 | PHP | abdibogor/The-Bad-Tutorial | /03_PHP/32.Break Statement.php | UTF-8 | 305 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Abdibogoreh</title>
</head>
<body>
<?php
for($val=1;$val<=20;$val++)
{
if($val==15)
{
break;
}
echo "{$val}<br />";
}
echo "<br />";
echo "We are out of the loop!";
?>
</body>
</html>
| true |
d55d00e8c9d1b3b31a3ab7319261029fa83c188a | PHP | oozkaya/42_piscine_php | /d01/ex06/ssap.php | UTF-8 | 307 | 3 | 3 | [] | no_license | #!/usr/bin/php
<?PHP
function ft_split($str)
{
$split = array_filter(explode(' ', $str));
sort($split);
return $split;
}
unset($argv[0]);
foreach ($argv as $value)
{
$split = ft_split($value);
foreach ($split as $elem)
$array[] = $elem;
}
sort($array);
foreach ($array as $val)
echo $val."\n";
?> | true |
947c8bd3fb35a645a65d9a28d4f39e6f83f31c35 | PHP | Ruchdee/fms-square-ms | /staff/university_life_op.php | UTF-8 | 3,413 | 2.609375 | 3 | [] | no_license | <?php
session_start();
//set current timezone
date_default_timezone_set("Asia/Bangkok");
//upload file
//file types allow to upload
$file_type_allow = array('image/jpg', 'image/jpeg', 'image/png', 'image/gif');
//max file size - 5M
$max_file_size = 5000000;
if($_FILES['article-im... | true |
a44a1b0fb335fb9ea19c9e25e5af3a1ecb564987 | PHP | qingbing/pf-tools-mail | /src/tools/Email.php | UTF-8 | 18,240 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Link : http://www.phpcorner.net
* User : qingbing<780042175@qq.com>
* Date : 2019-01-11
* Version : 1.0
*/
namespace Tools;
use Abstracts\Component;
use Helper\Exception;
class Email extends Component
{
/* @var string Smtp host, eg: smtp.163.... | true |
c7154b6ea1fbc06de4cca4b16ff23692b48c3b10 | PHP | aprog1978/aulas_oo_php | /aula12/index.php | UTF-8 | 1,583 | 2.859375 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title>Aula 12</title>
<?php
error_reporting(E_ALL);... | true |
e91757482852cd937b4608192fcc1cfb852b078c | PHP | predakanga/Introspection | /Parsers/TypedStatementList.php | UTF-8 | 3,976 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* Copyright (c) 2011, predakanga
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list ... | true |
899e428cfd2951ba0fc8bfc7c0280f1f423b12a9 | PHP | AlvaroGarciaTorres/Desarrollo_Servidor | /tema_2/coleccion3/ejercicio_2/ejercicio2_2/php/variables.php | UTF-8 | 435 | 2.546875 | 3 | [] | no_license | <?php
/*define('NUMBER_OF_QUESTIONS', count($verbs_array)*3);*/
$verbs_array = array(
array("spanish_form" => "Ir", "go", "went", "gone"),
array("spanish_form" => "Dormir", "sleep", "slept", "slept"),
array("spanish_form" => "Venir", "come", "came", "come"),
array("spanish_form"... | true |
8a0e49cbf5a29850b3f257d51b891681992e1876 | PHP | jakedowns/roblox-api-fetch-all-pages | /index.php | UTF-8 | 3,383 | 2.671875 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
require 'RobloxAPIService.php';
function original_example() {
$userid = htmlentities($_GET['userid'], ENT_QUOTES);
$assettypes = array("Hat", "Face", "Gear", "HairAccessory", "FaceAccessory", "NeckAccessory", "ShoulderAccessory", "FrontAccessory", "BackAccessory", "Wais... | true |
5ad2389abea39382a9ac6c08683e61ffd21ef786 | PHP | ruochenxu92/PHP | /intern_search.php | UTF-8 | 997 | 2.71875 | 3 | [] | no_license | <?php
class search{
public $kw;
public $location;
public $company;
public $salary;
public $type;
public static $search_id = 0;
public $mysql;
//?check whether $kw, $location, $company, $salary, $type is empty var_dump(isset($_POST['name']);
public function __contruct($kw, $location, $company,$sala... | true |
d32286578f67f55510224b780418069026f78fc8 | PHP | RodrigoVidalGuzmanDiaz/Sistematizacion-de-formularios-ARCA | /common/models/poc/TrTipoPeriodo.php | UTF-8 | 1,168 | 2.59375 | 3 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\poc;
use Yii;
use common\models\modelpry\ModelPry;
/**
* Este es el modelo para la clase "tr_tipo_periodo".
*
* @property integer $id_tperiodo
* @property string $nom_tperiodo
*
* @property TrPeriodo[] $trPeriodos
*/
class TrTipoPeriodo extends ModelPry
{
/**
* @inheritd... | true |
058c79f33a4a8ad3575057de880b0d1fae970d89 | PHP | felipemineir0/TesteLojaPC | /app/admin/Controller/Component/EmailTemplateComponent.php | UTF-8 | 4,735 | 2.71875 | 3 | [] | no_license | <?php
class EmailTemplateComponent extends Component {
protected $_controller = null;
public function startup(Controller $controller) {
$this->_controller = $controller;
}
public function __construct($collection = null, $settings = array()) {
//parent::__construct($collection, $setti... | true |
4cab3299983b27f4a4531425e410e8d0cd0d88e9 | PHP | anrawool/Automator | /controllers/LoginController.php | UTF-8 | 979 | 2.5625 | 3 | [] | no_license | <?php
session_start();
include '../inc/config.php';
$email = $_POST['email'];
$password = $_POST['password'];
$query = "SELECT * FROM `users` WHERE email='$email'";
$db_pwd = $mysqli->query($query);
function login($email, $db_pwd, $password) {
include '../inc/config.php';
if(!empty($email) && !empty($passw... | true |
03a7a1a9cdcc17f9430a231146944d0e25550736 | PHP | Squirrel10/it261 | /weeks/week10/movie-view.php | UTF-8 | 3,256 | 2.71875 | 3 | [] | no_license | <?php // index.php this is our wonderful home page that can only be reached if you login successfully!
session_start();
include('config.php');
include('includes/header.php');
if(!isset($_SESSION['UserName'])) {
$_SESSION['msg'] = 'You must log in first';
header('location:login.php');
}
if(isset($_GET['logo... | true |
eaa0bbc78aa0827ded22c17baf95230ad15943e4 | PHP | dinhtienn/eCommerce-trangiafs | /database/seeds/TopProductsTableSeeder.php | UTF-8 | 444 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Models\Product;
use App\Models\TopProduct;
class TopProductsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$list_random_product = Product::all()->random(7);
foreach ($l... | true |
a588c962cdae4eb2ab5e246f91b39c0f92441a83 | PHP | MrDingOfLove/PHP_practice | /article/data_get.php | UTF-8 | 516 | 2.546875 | 3 | [] | no_license | <?php
include_once "database_link.php";
//删除 id 列表
$delete_id_sql = "alter table article_copy drop id";
executeSQL($delete_id_sql);
//重新添加 id 列 设为主键 自增长
$add_id_sql= "Alter table article_copy add COLUMN id INT NOT NULL AUTO_INCREMENT PRIMARY KEY first";
executeSQL($add_id_sql);
$sql = "select id,title,time ... | true |
a6415dc5085b39689193baf49de0bc6720479391 | PHP | followkim/pixie | /addApplication.php | UTF-8 | 11,899 | 2.9375 | 3 | [] | no_license | <?php
/*
* addApplication.php
* Adds or edits an application.
*
* POST will either add or update an application. Which is determined by the presence of
* an applicationID-- if present, then update, if not then add.
* GET variables will allow a user to view or delete an application.
*/
// Pull in i... | true |
c5f5dcc50eca553d06dbfed312f96cbaa05a2cdd | PHP | MrAizakku/CST126Milestone | /userHandler.php | UTF-8 | 1,416 | 2.6875 | 3 | [] | no_license | <?php
session_start();
require('myfuncs.php');
if ($_SESSION['ROLE'] != 'EXEC') {
header('Location: index.html');
exit;
}
$id = $_GET["id"];
$mode = $_GET["mode"];
$role = $_GET["role"];
$currUser = getUserId();
if($id != $currUser) {
if($mode=="Delete") {
$conn = dbConnect();
$s... | true |
ac878b153a0d75cb6b0664438639bd3cedd3327e | PHP | akashsinha123/php-practice | /bala/cookies/index.php | UTF-8 | 936 | 3.078125 | 3 | [] | no_license | <?php
$cookie_name = 'user';
$cookie_value = 'Akash Sinha';
setcookie($cookie_name, $cookie_value, time() + (86400*30), "/");
$cookie_name2 = 'name';
$cookie_value2 = 'Bicku Sinha';
setcookie($cookie_name2, $cookie_value2, time() + (86400*30), "/");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-... | true |
ce47a147a112ea76ec0f479a818eb22fef8d33b2 | PHP | zorille/php_framework | /APIWeb/coservit/Zorille_coservit_TimePeriods.class.php | UTF-8 | 4,720 | 2.734375 | 3 | [] | no_license | <?php
/**
* Gestion de coservit.
* @author dvargas
*/
namespace Zorille\coservit;
use Zorille\framework as Core;
use Zorille\framework\abstract_log;
/**
* class TimePeriods
*
* @package Lib
* @subpackage coservit
*/
class TimePeriods extends globalapi {
/**
* var privee
*
* @acces... | true |
f14d8395158881ff8ef949baa2e63ca15e80ac3b | PHP | JRobertoMA/album-products | /php/password.php | UTF-8 | 1,240 | 2.84375 | 3 | [] | no_license | <?php
class Password {
private $options = array('cost' => 10);
public function optimalCost($password) {
$timeTarget = 0.05;
$cost = 8;
do {
$cost++;
$from = microtime(true);
password_hash($password, PASSWORD_DEFAULT, ["cost" => $cost]);
... | true |
b8b18b99e11716a1203e9f43d33b14ca8cb26743 | PHP | paolofruci/performance | /data.php | UTF-8 | 14,865 | 2.71875 | 3 | [] | no_license | <?php
class db
{
// property declaration
// avvio una connessione con il database MySQL
private $dbServer = "localhost";
private $dbUser = "vmware";
private $dbPassword = "Password1";
private $dbName = "vmware";
function __construct() {
# CONNESSIONE AL DB
$t... | true |
3aec3db3565b5978966a130e3eb9d97eae7562d7 | PHP | baniplus/wp-nonces | /src/class-wp-nonces.php | UTF-8 | 6,011 | 3.125 | 3 | [] | no_license | <?php
/**
* Nonces API: WP_Nonces class
*
* Use WordPress Nonces in an object orientated environment
* @author Vitalie Glodeanu <vglodeanu@gmail.com>
*/
class WP_Nonces {
/**
* Default nonces settings
*
* @var array
*/
private static $settings;
/**
* @param array $settings
*/
public function __c... | true |