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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6ba59bfe50ac0d0e0acc052549160dd136877adb | PHP | evervasquez/ucp-php | /conexion_mysql.php | UTF-8 | 1,037 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/*
* 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.
*/
//crear el objeto para la conexión
$link = mysql_connect('localhost', 'root', '')
or die('No se pudo conectar: ' . mys... | true |
9bb01556a64c783bb34b001e762e367188e5fb9a | PHP | 2IIZ/PHP | /Exo/8_classPOO/AvatarManager.php | UTF-8 | 1,224 | 3.125 | 3 | [] | no_license | <?php
# @Date: 2018-06-19T09:41:27+02:00
# @Last modified time: 2018-06-19T10:27:47+02:00
//A manager is for the CRUD
class AvatarManager {
private $_db;
public function __construct($db){
$this->setDb($db);
}
public function add(Avatar $avatar){
//INSERT INTO
$insert = $this->_db->prepare('INS... | true |
999a9b4419078782f366f2898af1746c151ccd57 | PHP | ViktThor2/electryshop | /app/Http/Controllers/Frontend/OrderController.php | UTF-8 | 1,916 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Frontend;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\{Order, ShopCart, Delivery, Product};
class OrderController extends Controller
{
public function create(Request $request)
{
$scart = session()->get('scart');
$delivery ... | true |
209221753412c7afe38491af3fce1ff1beab107d | PHP | BackupTheBerlios/nangband | /website/extras/gmtime.inc | UTF-8 | 1,543 | 3.234375 | 3 | [] | no_license | <?php
//
// Description:
// Implements the gmttime function if missing from the PHP distribution
//
//
// Function: gmttime
//
// Description:
// Returns an array indexed as by the localtime() function:
// - 0 or tm_sec: Seconds
// - 1 or tm_min: Minutes
// - 2 or tm_hour: Hour
// - 3 or tm_mday: Day of th... | true |
82b107ab586e5489e99166ac46fd956a41cb1946 | PHP | KiltedViking/kiltedviking-net | /se/www/php/lathund/funktioner/getdate.php | ISO-8859-3 | 401 | 2.984375 | 3 | [] | no_license | <HTML>
<HEAD>
<TITLE>Funktioner - datum</TITLE>
</HEAD>
<BODY>
<H1>Funktioner - datum</H1>
<H2>getdate()</H2>
<PRE>
<?
$arrDatum = getdate();
print "\$arrDatum['hours']: " . $arrDatum['hours'] . "<BR>";
print "\$arrDatum['minutes']: " . $arrDatum['minutes'] . "<BR>";
print "\$arrDatum['wday']: " . $... | true |
fcb0cba3318761618308f87a4d7b6c9db6340671 | PHP | damic88/pickmystuff | /src/Odiseo/Bundle/PickMyStuffBundle/Entity/Mercancy.php | UTF-8 | 2,756 | 2.59375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Odiseo\Bundle\PickMyStuffBundle\Entity;
use DateTime;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\HttpFoundation\File\File;
class Mercancy
{
private $id;
private $createdAt;
private $updatedAt;
private $type;
private $length;
private $width;
priv... | true |
bab40b290e75b4e50a2c0ea9bc12ab6ffc1f1ed7 | PHP | luxuriaz/csc435-spring2017 | /exercises/exercise05/CheckUser.php | UTF-8 | 2,040 | 2.734375 | 3 | [] | no_license | <?
$host = "localhost";
$user = "root";
$password = "";
$input_username="";
$mysqli = new mysqli($host, $user, $password, "FavoriteFood");
if ($mysqli->connect_errno) {
die("Error: " . $mysqli->connect_errno);
}
$sql = "SELECT UserName, Password FROM Users";
$result = $mysqli->query($sql);
$in... | true |
9d0ed37c6eba4eb77e7754616310a14a62a0af95 | PHP | kattsoftware/FireSessions | /tests/FireSessions/Drivers/RedisTest.php | UTF-8 | 29,906 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace FireSessions\Tests\Drivers;
use FireSessions\Drivers\Redis as RedisDriver;
class RedisTest extends \PHPUnit_Framework_TestCase
{
private static $true;
private static $false;
/**
* @var \PHPUnit_Framework_MockObject_MockObject|\Redis
*/
private $redisMock;
public stati... | true |
1f7e05d2fea1329d7d90c3f0dd2d65a474fd7a51 | PHP | VyacheslavGL/PHP_work | /HW_5/part 1/1_file.php | UTF-8 | 3,111 | 2.84375 | 3 | [] | no_license | <?php
//1. Удаление каталога. Написать рекурсивную функцию удаления непустого каталога
$file = 'D:\Soft\OSPanel\domains\lessonPHP.ru\lesson 5\home\file_system\file_dir';
function removeDirectory($dir) {
if ($objs = glob($dir."/*")) {
foreach($objs as $obj) {
is_dir($obj) ? removeDirector... | true |
b2aff732faa33e2f1b61a8dbf00a4672ffe7d55c | PHP | divanova-v/pet-shop | /src/AppBundle/Entity/User.php | UTF-8 | 5,898 | 2.59375 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
/**
* User
*
* @ORM\Table(name="user")
* @ORM\Entity(repositoryClass="AppBundle\Reposi... | true |
c7b680b28320ad962817917f04499c942c4f69cd | PHP | AnthraxisBR/swoole-fastwork | /src/Http/Request.php | UTF-8 | 4,864 | 2.578125 | 3 | [] | no_license | <?php
namespace AnthraxisBR\FastWork\Http;
use AnthraxisBR\FastWork\traits\Injection;
use GuzzleHttp\Psr7\Request as RequestBase;
use Psr\Http\Message\RequestInterface;
use Swoole\Http\Request as SwooleRequest;
class Request extends RequestBase
{
use Injection;
public $name;
/**
* @var string
... | true |
ffc4d550207d9e69c8cdf52a8671692e1e2ab0b0 | PHP | diegosimon/Crud | /Dao/ProdutoDAO.php | UTF-8 | 4,167 | 2.6875 | 3 | [] | no_license | <?php
class ProdutoDAO {
function inserir(Produtos $produtos) {
include ("Conexao.php");
$sql = mysql_query("insert into produto (codigo,
descricao,
qtd_estoque,
... | true |
7f87099464dc07283a23926ee4a5aa496611a0f8 | PHP | exonet/powerdns-php | /examples/cryptokeys.php | UTF-8 | 1,555 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__.'/../vendor/autoload.php';
require __DIR__.'/CliLogger.php';
// This example will create, activate, deactivate and delete Crypto Keys for DNSSEC in an existing zone.
use Exonet\Powerdns\Powerdns;
$domain = 'dns-new-zone-test.nl';
// Update the key to the real PowerDNS API Key.
$powerdns = ne... | true |
39425b148bbd448861d8c179c356a7bd0804cd50 | PHP | lethosoict/BKN | /quantri/phpclass/error.php | UTF-8 | 400 | 2.734375 | 3 | [] | no_license | <?php
function CheckError($submit, $error){
if($submit == $error){
return 1;
}
}
function IssueError(){
return '<span style = "color:red"> * </span>';
}
class GetSubmit{
var $error;
var $submit;
function GetSubmit($submit, $error){
if(CheckError($submit, $error)){
$this->error... | true |
7595d9821ad4aa2a4f6a136d519c6cd7b45d50f5 | PHP | supercool27/ionize | /application/libraries/ftl/binding.php | UTF-8 | 11,697 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/*
* Created on 2009 Jan 02
* by Martin Wernstahl <m4rw3r@gmail.com>
*/
/**
* The representation of the tag which is passed to the tag functions.
*
* @package FTL_Parser
* @author Martin Wernstahl <m4rw3r@gmail.com>
* @modified Ionize team
* @copyright Copyright (c) 2008, Martin Wernstah... | true |
431124361ade2ff1ee1ceb4726f48a8eac3ce016 | PHP | Ihebarroum/E-Lerning | /fichier.php | UTF-8 | 3,561 | 2.734375 | 3 | [] | no_license | <?php
include('Traitement/connex_bdd.php');
?>
<?php
/* Function: download with resume/speed/stream options */
/* List of File Types */
function fileTypes($extension){
$fileTypes['pdf'] = 'application/pdf';
$fileTypes['zip'] = 'application/zip';
... | true |
6ffe99f14e3f3ea336586edd040513547a8cef9a | PHP | andrewscofield/wp-mvc | /core/models/wp_models/mvc_post.php | UTF-8 | 744 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class MvcPost extends MvcModel {
var $table = '{prefix}posts';
var $primary_key = 'ID';
var $order = 'post_date DESC';
var $display_field = 'post_title';
var $has_many = array(
'Comment' => array(
'class' => 'MvcComment',
'foreign_key' => 'comment_post_ID'
),
'Meta' => array(
'class' => 'Mvc... | true |
2f5c28ad2c8afe96aba33faed55b9ec5a7316bf7 | PHP | dewadg/synchrome-api | /app/Services/UserService.php | UTF-8 | 1,572 | 3.015625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\RepositoryInterface;
use App\User;
class UserService
{
/**
* @var RepositoryInterface
*/
protected $repo;
/**
* UserService constructor.
*/
public function __construct(RepositoryInterface $repo)
{
$this->repo = $repo;... | true |
d5aae6575f878b9249ff3674e6e97c1f56297ce9 | PHP | ivancas84/fines2-estructura | /src/class/controller/CantidadAsignaturasAprobadasAlumnosTramo.php | UTF-8 | 2,345 | 2.53125 | 3 | [] | no_license | <?php
require_once("function/php_input.php");
require_once("function/array_group_value.php");
class CantidadAsignaturasAprobadasAlumnosTramo {
/**
* Dado un numero de comision se obtienen los alumnos y la cantidad de asignaturas aprobadas
*/
public $idComision;
public $comision;
public $idAlumno_ = [... | true |
2d67baee9991d14c7f859ee1e706178ec130fa99 | PHP | masterofmagento/Magento2-Shortcuts | /Webpos/Block/Login.php | UTF-8 | 545 | 2.5625 | 3 | [] | no_license | <?php
namespace Magestore\Webpos\Block;
class Login extends AbstractBlock
{
/**
* Produce and return block's html output
*
* This method should not be overridden. You can override _toHtml() method in descendants if needed.
*
* @return string
*/
public function toHtml()
{
... | true |
38efedd93a25690826ce60779eeed292403a37cf | PHP | WsdlToPhp/PackageOvh | /src/StructType/TelephonySmsSetCallBack.php | UTF-8 | 3,324 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ovh\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for telephonySmsSetCallBack StructType
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class TelephonySmsSetCallBack extends AbstractStructBase
{
/**
* The session
* Meta info... | true |
7472a1a6f7b7638647d47c90f2c4cd6a391e9aa7 | PHP | ontheroadjp/laravel5_bbc | /app/Http/Controllers/PostsController.php | UTF-8 | 2,325 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\BBC;
use App\Models\Post;
use App\Http\Requests;
use App\Http\Requests\CreatePostRequest;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PostsController extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
... | true |
62a6ac478b5a969294477a0ce2de68f10ece8e1d | PHP | raselcse/wordpress_plugins | /site-admanager/oployeelabs-admanager/models/advertisementType.php | UTF-8 | 697 | 2.640625 | 3 | [] | no_license | <?php
class AdvertisementType extends OplModel{
public function __construct(){
parent::__construct();
}
public function save_type($table , $data){
return $this->save_opl($table , $data);
}
public function getAll_type($table){
return $this->getAll_opl($table);
}
public funct... | true |
e7a5bd6c54e0a0354b6e9734e3bb3c500e06802a | PHP | yanjingxia/thinkphp | /Application/Common/Common/function.php | UTF-8 | 8,991 | 2.84375 | 3 | [] | no_license | <?php
Vendor('PHPMailer.PHPMailerAutoload');
import('ORG.Util.PasswordHash');
/**
* 递归方式的对变量中的空格trim
*
* @access public
* @param mix $value
*
* @return mix
*/
function cleanCharacterDeep($value) {
if (empty($value)) {
return $value;
} else {
return is_array($value... | true |
b86f7a21f231ba1a2f24949d79dde31994549d33 | PHP | garbetjie/laravel-jsonapi | /tests/Extractors/PassthroughIncludeExtractorTest.php | UTF-8 | 1,611 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Garbetjie\Laravel\JsonApi\Tests\Extractors;
use Garbetjie\Laravel\JsonApi\IncludeExtractorInterface;
use Garbetjie\Laravel\JsonApi\Extractors\PassthroughIncludeExtractor;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use PHPUnit\Framework\TestCase;
use function is_array;
u... | true |
e62a576fe0d4e9e41a2ad629de05580a163b9eb7 | PHP | ugurarici/oyk2019kis | /oop-blog/classes/ArticleController.php | UTF-8 | 1,291 | 2.609375 | 3 | [] | no_license | <?php
class ArticleController
{
static public function list()
{
$allArticles = Article::all();
require "views/list.php";
}
static public function create()
{
require "views/create.php";
}
static public function store()
{
$article = new Article;
$... | true |
cef40dd20741775609617542320de2c9421324b3 | PHP | mubn/weather-stats | /app/data.php | UTF-8 | 856 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
require 'login.php';
$fromDate = $_GET["fromDate"];
$toDate = $_GET["toDate"];
$sensorid = $_GET["sensorid"];
$db = new SQLite3('/db/weather.db');
$i = 0;
$res;
if (!isset($sensorid) || !is_numeric($sensorid)) {
die('Wrong sensor data');
}
if (isset($fromDate) && isset($toDate)) {
$res = $db->query("SEL... | true |
ac1dd896813f4c9af0060dc8d46800b345a3e14a | PHP | Antonin-dev/espace-membre | /index.php | UTF-8 | 3,368 | 3.078125 | 3 | [] | no_license | <?php
session_start();
require('src/config.php');
if (!empty($_POST['pseudo']) && !empty($_POST['email']) && !empty($_POST['password']) && !empty($_POST['confirmPassword'])) {
// Controle des données
$pseudo = htmlspecialchars($_POST['pseudo']);
$email = htmlspecialchars($_POST['email']);
$password =... | true |
25eaa7acf88f55571148e228d4beae6d9b387969 | PHP | aleksandr-shch/insly | /app/PolicyCalculation.php | UTF-8 | 1,131 | 2.96875 | 3 | [] | no_license | <?php
require_once __DIR__ . '/CarInsuranceCalculation.php';
require_once __DIR__ . '/CarInsuranceCalculator.php';
class PolicyCalculation
{
/**
* @var float Base premium
*/
public $basePremium = 0;
/**
* @var float Commission
*/
public $commission = 0;
/**... | true |
9cfc734d22bafa740e60d330d83e46ba474190a6 | PHP | roldanordonez1990/php | /Preferencias/Preferencias.php | UTF-8 | 2,858 | 2.859375 | 3 | [] | no_license | <?php
session_start();
//Creamos la sesión
//setcookie(session_name(), session_id(), time()+3600);
if(isset($_POST['establecer'])){
//Mientras la sesión permanece abierta, puedes utilizar la variable superglobal $_SESSION para añadir información a la sesión del usuario
$_SESSION['idioma'] = $_POST['idioma'];
$_SESSION... | true |
9ec867b8a7c962e435050174a338b9809546dfff | PHP | mschori/M133_PictureCloud | /app/Http/Controllers/LibraryController.php | UTF-8 | 684 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class LibraryController extends Controller
{
// Check if logged in
public function __construct()
{
$this->middleware('auth');
}
// Render library-view and send images, email and username
public function library()
... | true |
4b9a1b012e8c353fdcec34da5120b9df0a77ea42 | PHP | mrpiatek/blue-client | /spec/Services/ProductsIndexServiceSpec.php | UTF-8 | 2,301 | 2.546875 | 3 | [] | no_license | <?php
namespace spec\MrPiatek\BlueClient\Services;
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Response;
use MrPiatek\BlueClient\Services\ProductsIndexService;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class ProductsIndexServiceSpec extends ObjectBehavior
{
const API_PREFIX = 'api/v1';
function let(... | true |
0003031b83cb0225d285ba7eda8f57150ab0f860 | PHP | DmitryKmita/phpbench | /lib/Result/SubjectResult.php | UTF-8 | 963 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the PHP Bench package
*
* (c) Daniel Leech <daniel@dantleech.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PhpBench\Result;
class SubjectResult
{
private $name;
private $d... | true |
c1e83db2ce71b61175fc68d7b6714c829bb91260 | PHP | amichaiman/php_loginsystem | /includes/signup.inc.php | UTF-8 | 1,525 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST['submit'])){
include_once 'dbh.inc.php';
if ($conn == null){
go_back_to_main("itsnull");
}
$first = mysqli_real_escape_string($conn,$_POST['first']);
$last = mysqli_real_escape_string($conn,$_POST['last']);
$email = mysqli_real_escape_string($conn,$_POST['email']);
$... | true |
b32340c3b1be985877c4dbc792a0e7ec35a6e77e | PHP | Raunts26/Job-Exchange-for-youngsters | /content/register.php | UTF-8 | 7,014 | 2.515625 | 3 | [] | no_license | <?php
//Lehe nimi
$page_title = "Avaleht";
//Faili nimi
$page_file = "home.php";
?>
<?php
require_once("../inc/functions.php");
//variables
$create_email = "";
$create_password = "";
$create_employer_email = "";
$create_employer_password = "";
//errors
$create_email_error = "";
$create_password_error = ... | true |
898357074a4aea9fab9b8ef1c17a6864f51e3aed | PHP | QuintenvL/Educom_Webshop | /tests/sessionTest.php | UTF-8 | 4,267 | 2.734375 | 3 | [] | no_license | <?php
include_once __DIR__.'/../session.php';
use PHPUnit\Framework\TestCase;
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
class SessionTest extends TestCase{
protected function setup():void{
$_SESSION = array();
}
public function test_isLoggedIn_log... | true |
28666bb105313c26e78a0bd1972f258f9197bdf4 | PHP | joelsonbraga/payme | /app/Repositories/WalletTransaction/WalletTransactionEntity.php | UTF-8 | 2,613 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Repositories\WalletTransaction;
/**
* Class WalletTransactionEntity
* @package App\Repositories\WalletTransaction
*/
class WalletTransactionEntity
{
/**
* @var
*/
private $id;
/**
* @var
*/
private $uuid;
/**
* @var
*/
private $payer;
/... | true |
3d45ff4e2d4210d6fd65f1f3b7309b06c98e5709 | PHP | csabat123/PA1907 | /app/Imports/UsersImport.php | UTF-8 | 668 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\Role;
use App\User;
use Maatwebsite\Excel\Concerns\ToModel;
class UsersImport implements ToModel
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloquent\Model|null
*/
public function model(array $row)
{
$user =User::create([
... | true |
b5e88ef94f39f376746c9516c826f88546f3888d | PHP | Boooobbbyy/crm | /app/Database/Seeds/UserSeeder.php | UTF-8 | 478 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Database\Seeds;
use \CodeIgniter\I18n\Time;
class UserSeeder extends \CodeIgniter\Database\Seeder
{
public function run()
{
$data = [
'nama' => 'Administrator',
'username' => 'admin',
'password' => password_hash('admin', PASSWORD_... | true |
eda65f74ceb2c9f54aa350ff268178ff257405ec | PHP | rickyork/Hot-Toddy | /hFramework/hFrameworkToRuby/hFrameworkToRuby.shell.php | UTF-8 | 1,842 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
#//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#//\\\ \\\\\\\\|
#//\\\ @@ @@\\\\\\| Hot Toddy Framework
#//\\ @@@@ @@@@\\\\\|
#//\\\@@@@| @@@@\\\\\|
#//\\\ @@ |\\@@\\\\\\| https://github.com/rickyork/Hot-Toddy
#//\\\\ || \\\\\\\| © Copyright 2019 Richard Yor... | true |
4c07009906d1058ffa34cfe01d41276fee589870 | PHP | yonesAkram/newGitTest | /items.php | UTF-8 | 503 | 2.53125 | 3 | [] | no_license | <?php
session_start();
$PageTitle = 'Show Items';
include "init.php";
//Check if Get Request itemid Is Numeric & Get The integar Value Of It
$itemid = isset($_GET['itemid']) && is_numeric($_GET['itemid']) ? intval($_GET['itemid']) : 0;
$stmt = $con->prepare("SELECT * FROM `items` WHERE `item_ID` = ? ");
$s... | true |
d917ac216d09e4c5c5f0bb921f508494ec67038b | PHP | russelmorris/alphaTracking | /application/models/M_auth.php | UTF-8 | 819 | 2.546875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) {
exit('No direct script access allowed');
}
class M_auth extends CI_Model
{
/**
* Holds an array of tables used
*
* @var array
**/
public function __construct()
{
parent::__construct();
}
public function check_credentials($email, ... | true |
8860d69918a93f89af34bab2c3f76cd905d2e16d | PHP | bw32du/starphp | /starphp/Request.php | UTF-8 | 363 | 2.671875 | 3 | [] | no_license | <?php
class Request
{
public $app;
public $controller;
public $action;
public $get;
public $post;
private static $request = null;
private function __construct(){}
public static function instance()
{
if(is_null(self::$request)){
self::$request = new Request();
... | true |
37ec00e4253f9b14b3df539abf1f6bd352b5b371 | PHP | MaxGeras/CS313-PHP | /web/week03/review.php | UTF-8 | 3,930 | 2.6875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION["login_user"]) || strlen(trim($_SESSION["login_user"])) == 0)
{
header('location: user.php'); // Redirecting To Other Page
exit();
}
?>
<!DOCTYPE html>
<html>
<header>
<link rel="stylesheet" type="text/css" href="style.css" />
<script>
function goBack() {
... | true |
3da92b1bb419c54add775ae77495b444069ca1a1 | PHP | csm-applications/CSM-CrowdSLR | /config.php | UTF-8 | 1,180 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
################################################
//Setup here your admin user and password
$user = "admin";
$password = "1234";
################################################
session_start();
if (isset($_POST['username']) && isset($_POST['password'])){
if($_POST['username'] == $user && $_POST['passwo... | true |
98a431dc9edee6ace7cb48b123ea67feaaa64ff4 | PHP | dhinesh132/lifestyle | /classes/connections1.class.php | UTF-8 | 35,382 | 2.59375 | 3 | [] | no_license | <?php
//global $img_obj;
//$img_obj = new images();
class database_manipulation
{
//member variables - Start
var $serevername;
var $dbname;
var $dbusername;
var $dbpassword;
var $dbresource_id;
//member variables - End
//Constructor - Start
function database_manipula... | true |
d6a29c3af0e3ebba57814b53de0c98f31a825c81 | PHP | darksworm/openchat_kata_inside_out | /laravel/app/Domain/Register/Http/UserTransformer.php | UTF-8 | 299 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Domain\Register\Http;
use App\Models\User;
class UserTransformer
{
public static function transform(User $user)
{
return [
'id' => $user->user_id,
'username' => $user->username,
'about' => $user->about
];
}
}
| true |
0534244f10a83101ef0fb6dd8d7f547f0d13e25b | PHP | justinwerre/3660 | /public/php/newUser.php | UTF-8 | 3,890 | 2.609375 | 3 | [] | no_license | <?php
include "databaseConnect.php";
include "functions.php";
//Check if submitted
if (isset($_POST['submitted'])) {
$sql = "INSERT INTO CUSTOMERS (cEmail,cPassword,cAddress,cfName,clName)
VALUES('$_POST[email]','$_POST[password]','$_POST[address]','$_POST[firstName]','$_POST[lastName]')";
... | true |
808df69b0e74e0ecbb84acc514d93e2773d34fbe | PHP | hiepbui312/project_laravel | /app/Http/Controllers/adminController/UserController.php | UTF-8 | 1,400 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\adminController;
use App\Http\Controllers\Controller;
use App\Models\adminModels\UserModel as MainModel;
use Session;
class UserController extends Controller
{
public $model;
//ham tao
public function __construct(){
//gan bien $model la mot object cuar model User
$this->... | true |
869dcc7a43a4f9a83a13c818a3015994a6fbaee0 | PHP | cxc61cxc/opencatamap-php | /catasto_particella_2geojson.php | UTF-8 | 5,309 | 2.59375 | 3 | [] | no_license | <?php
#############################################
# Terreni
#############################################
// recupera le variabile della particella fg e map, che arrivano da visura particella - mappa-
$fg=htmlspecialchars($_GET["fg"]);
$map=htmlspecialchars($_GET["map"]);
###########################################... | true |
1311d2a9ec2696549e353206f049a32a0f6e5c63 | PHP | mikedfunk/doctrine-example | /update_product.php | UTF-8 | 1,097 | 3.140625 | 3 | [] | no_license | <?php
/**
* update a product via cli
*
* @package DoctrineExample
* @license MIT License <http://opensource.org/licenses/mit-license.html>
*/
require_once 'bootstrap.php';
$productId = $argv[1];
$productName = $argv[2];
// the product repository also has a find method
$productRepository = $entityManager
->ge... | true |
b6586bad41d54ddbab04ca9f12d9ebb0de4f5a6c | PHP | pambergonz/practicasdh | /php_oopintegradoPHP_16-07_clase2/prueba.php | UTF-8 | 433 | 2.578125 | 3 | [] | no_license | <?php
require_once('cuenta.php');
require_once('persona.php');
require_once('classic.php');
require_once('gold.php');
$cuenta1 = new Classic();
$cuenta1->debitar(7000,"banelco");
$cuenta1->setUltimoMovimiento("10-02-2019");
echo"<pre>";
var_dump($cuenta1);
echo"</pre>";
$cuenta2 = new Gold();
$cuenta2->setUltimoMov... | true |
69c58ac4d6abe77c5d34523ad170f801230f1294 | PHP | AntonMelyakov/todolist-php | /classes/connection.php | UTF-8 | 699 | 3.328125 | 3 | [] | no_license | <?php
class Connection
{
public static $servername = "localhost";
public static $dbname = "todo_list";
public static $username = "root";
public static $password = "";
public static $conn;
// get connection
public static function getConnection()
{
// Create connection
se... | true |
dee8e6abdf84349d8868baf23261a83f7987963c | PHP | AzonMedia/utilities | /src/StringUtil.php | UTF-8 | 2,537 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Azonmedia\Utilities;
/**
* Class StringUtil
* @package Azonmedia\Utilities
*/
abstract class StringUtil
{
public const DEFAULT_CHARACTERS_LIST = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
/**
* Replaces the last occurence of a string i... | true |
e4d708d68c8e5f3ea527cdd95efb9da32886d04f | PHP | vipulnaik/contractwork | /access-portal/backend/workerRoyaltyList.inc | UTF-8 | 1,366 | 2.578125 | 3 | [
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | <?php
$royaltySelectQuery = "select * from royalties where payee=? order by royalty_end_date desc";
$stmt = $mysqli->prepare($royaltySelectQuery);
$stmt->bind_param("s", $worker);
$stmt->execute();
$royaltySelectResult = $stmt->get_result();
print '<h4 id="workerRoyaltyList">Full list of royalties in reverse chronol... | true |
a798823f1478625bf9a4f62a7d180ccb995614c3 | PHP | SamLi-93/library | /backend/models/SmsAdmin.php | UTF-8 | 3,910 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\web\IdentityInterface;
/**
* This is the model class for table "sms_admin".
*
* @property integer $id
* @property string $username
* @property string $password
* @property string $name
* @property integer $gender
* @property integer $level
* @property integer $or... | true |
d182d8db9211fcb7dea02c79ddd8ab61a7e5e421 | PHP | sangitadas1995/create_image_thumbnail | /index2.php | UTF-8 | 1,479 | 2.90625 | 3 | [] | no_license | <?php
// PHP error reporting
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
/*
Note create a uploads folder
Under it create thumbnail folder
under uploads folder real image will be saved
and thumbnail will be set under thumbs folder
*/
// include file where image res... | true |
60dd33e4bce202253ffd3bc7eae17fc16c3e5d0e | PHP | Tieferson/laravel-prototipo | /resources/views/property/show.php | UTF-8 | 363 | 2.53125 | 3 | [
"MIT"
] | permissive |
<?php
if(!empty($property)){
foreach($property as $prop){
?>
<h1><?= $prop->title ?></h1>
<p>Descrição: <?= $prop->description ?></p>
<p>Valor de Locação: <?= $prop->rental_price ?></p>
<p>Valor de venda: <?= $prop->sale_price ?></p>... | true |
4388ca0b34d77bb06a49d3c42f89c4f3eaafd180 | PHP | TheCadien/sulu-headless-example | /src/Content/ContentTypeResolver/ProductContentTypeResolver.php | UTF-8 | 1,363 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Content\ContentTypeResolver;
use App\Entity\Product;
use App\Repository\ProductRepository;
use Sulu\Component\Content\Compat\PropertyInterface;
use Sulu\Bundle\HeadlessBundle\Content\ContentView;
use Sulu\Bundle\HeadlessBundle\Content\ContentTypeResolver\ContentTypeResolverInterface;
class Prod... | true |
31c7825ec506578590ee9c749b956a97ee81abc2 | PHP | timglabisch/graphql-demo | /lib/Document/src/Dto/Document.php | UTF-8 | 987 | 2.796875 | 3 | [] | no_license | <?php
namespace Tg\Document\Dto;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Tg\DocumentDomain\DocumentInterface;
class Document implements DocumentInterface
{
private $documentId;
private $title;
private $documentType;
public static function fromArray(array $data)
{
$da... | true |
4712e1bb9e76137687dc6fae5bfb733d4783e86c | PHP | sergejkaravajnij/minesweeper-php-backend | /symfony/src/World/WorldGenerator.php | UTF-8 | 1,864 | 3.234375 | 3 | [] | no_license | <?php
namespace App\World;
class WorldGenerator
{
/**
* @param WorldInputParams $inputParams
*
* @return array
*/
public function generate(WorldInputParams $inputParams) {
// spread bombs randomly into array
$size = $inputParams->getSize();
$numCells = pow($size, ... | true |
14e1a48469d29e6e5c265b367be6fbecde615e04 | PHP | siyun7/src | /app/Models/UserSocialite.php | UTF-8 | 2,059 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\UserSocialite
*
* @property int $id
* @property int $user_id 用户 ID
* @property string $type 登录方式
* @property string $account 账号
* @property \Illuminate\Support\Carbon|nul... | true |
1e3d04812dfaf7eaf5da50ea2e1c55f353719db6 | PHP | mgorzanski/project-starter | /app/Helpers/Templates.php | UTF-8 | 1,151 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Helpers;
use App\Config;
use Twig_Loader_Filesystem;
use Twig_Environment;
class Templates {
private static $instance;
public $layout = "layout";
public $items = array();
public $twig;
public static function getInstance() {
if(self::$instance === null) {
self::$instance = new Templates(... | true |
1c5d320ed3742766e8f5a2776585f6e811b131ce | PHP | OliBridgman/attic | /mysite/code/controllers/SearchController.php | UTF-8 | 1,333 | 2.640625 | 3 | [] | no_license | <?php
class SearchController extends Page_Controller {
private $tag;
private $results;
private $artists;
private $releases;
private $media;
private $news;
public function init() {
parent::init();
$this->tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
$this->setResults();
}
public func... | true |
1ba01fc50394486b8019e889c835c7d04202f74e | PHP | HouptLab/Cassowary | /cassowary.php | UTF-8 | 3,932 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Cassowary - a territorial CAS client
*
* @author Chuck Houpt <chuck@habilis.net>
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
// Setup
require_once 'cassowary-setup.php';
// force CAS authentication, if not already authenticated
if ( ! phpCAS::isAuthenticated())... | true |
e5469935d8771f5eb4fd1817977400b0b530a161 | PHP | ShiSiLang/PHP- | /15/3/register_ok.php | UTF-8 | 701 | 2.53125 | 3 | [] | no_license | <?php
class chkinput {
var $name;
var $pwd;
function chkinput($x, $y) {
$this->name = $x;
$this->pwd = $y;
}
function checkinput() {
include "conn/conn.php";
$info = mysql_query ( "insert into tb_user(user,password)value('" . $this->name . "','" . $this->pwd . "')" );
if ($info == false) {
... | true |
ca81915442c9348c140a96ef82878bf55df0c0fb | PHP | ZazaMatumona/Hands-on-Multi-Cloud-for-Developers | /Multi-cloud Infrastructure Management Tool/web/aws-domain.php | UTF-8 | 1,295 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
// TODO: supply vendor name as another parameter and support all vendors
if (preg_match('/^([a-zA-Z0-9._-]+)$/', $_GET["account"], $tmp1) && preg_match('/^([a-z0-9.-]+)$/', $_GET["domain"], $tmp2)) {
$account = $tmp1[1];
$domain = $tmp2[1];
$enc = urlencode($account);
} else
die("Missing arguments...");
$fi... | true |
ec1f629a0ec6a7d40f88e5cf09426e486dbd51cf | PHP | codingdosg/kirin | /model/MailHelper.php | UTF-8 | 195 | 2.890625 | 3 | [] | no_license | <?php
class MailHelper {
public static function send($to, $title, $content) {
$from = "admin@liangdianyike.com";
$headers = "From: $from";
mail($to,$title,$content,$headers);
}
}
| true |
060729075efebf1185ba8d7d259f70e2622283b8 | PHP | superhasty/NewsCMS | /app/Events/Auth/Login.php | UTF-8 | 723 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace NewsCMS\Events\Auth;
use Illuminate\Queue\SerializesModels;
use NewsCMS\Events\Event;
class Login extends Event
{
use SerializesModels;
public $credentials;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($array)
{
$... | true |
9da7d72ee9f22f0788dd5f85a65d4937cbe83bdb | PHP | joebailey26/PHP-Lessons | /slim-example.php | UTF-8 | 2,734 | 2.84375 | 3 | [] | no_license | <?php
require('/var/www/html/share/slim4/vendor/autoload.php');
// Import classes from the Psr library (standardised HTTP requests and responses)
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
require('database_connection.php'... | true |
2d566dbc31d4c86d7eb9653d656efb6b0d5ceae0 | PHP | SiebeVE/web-dev | /app/GameSetting.php | UTF-8 | 665 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class GameSetting extends Model
{
/**
* Get the row of given column
*
* @param $column
*
* @return mixed
*/
public function getData ($column) {
$game_setting = GameSetting::where('name', $column)->firstOrFail();
return $game_setting->dat... | true |
acc927a924544afdaa008b075f84d3d652e16803 | PHP | ktech0/design-pattern | /观察者模式Spl/ClientB.php | UTF-8 | 185 | 2.671875 | 3 | [] | no_license | <?php
/**
* 观察者B
*/
class ClientB implements SplObserver
{
public function update(SplSubject $subject)
{
echo "ClientB received from $subject->name.\n";
}
} | true |
5522b8e364c2c08c71592a93fe70fd448da00f23 | PHP | Tulika66/php | /d2/exercise/database/seeders/UserClientTableSeeder.php | UTF-8 | 599 | 2.78125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use App\Models\UserClient;
use Faker\Factory;
use Illuminate\Database\Seeder;
class UserClientTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
UserClient::truncate();
$faker = Fact... | true |
21272401e1d14919bdb9c43c0f705a9d9ff473dd | PHP | drom98/ESTClinic_OOP | /classes/InfoTabela.class.php | UTF-8 | 1,000 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
class InfoTabela {
private $itemLeft = array();
private $itemRight = array();
public function __construct($itemLeft = null, $itemRight = null)
{
$this->itemLeft = $itemLeft;
$this->itemRight = $itemRight;
$this->render();
}
public function setItemLeft($item) {
$this->itemLeft = $i... | true |
f0000bba906256265611c2ed9e349f4035999193 | PHP | InDei-Haiti/decoy | /views/shared/form/display/_locale.php | UTF-8 | 1,250 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
// Check whether the UI should be displayed
if (!$localize || $localize->hidden()) return;
// Create radios config
$config = Bkwld\Library\Laravel\Former::radioArray(Config::get('decoy.site.locales'));
// Look for other localizations of this record
if ($item && ($localizations = $localize->other())) {
$origin... | true |
8bb63323bf1cd8f917080fda1d80df89257b3ab4 | PHP | Saish-srage13/meridian | /app/Libraries/Url.php | UTF-8 | 965 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries;
class Url {
protected $module;
public function __construct()
{
$controller = service('router')->controllerName();
$this->module = 'user';
if(strpos($controller, '\Admin')) $this->module = 'admin';
}
public function getBackendUri($link = nul... | true |
cea77aaff431f2346716f3edf84aa1f63c5c4fbb | PHP | ronnelbrian/OJTMS | /admin/models/create_announcement.php | UTF-8 | 1,658 | 2.625 | 3 | [] | no_license | <?php
require_once('../../connection.php');
if($_POST) {
$title = $_POST['title'];
$announcement = $_POST['announcement'];
$created_at = date('Y-m-d');
// $start_date = str_replace('/','-',$_POST['date_from']);
// $end_date = str_replace('/','-',$_POST['date_to']);
$start_date = date('Y-m-d', strtotime(... | true |
63100b6f4ff046439ee2c3f706b9188dbcbe77fa | PHP | nickveenhof/TeamleaderApiClient | /src/Request/Meeting/RetrieveMeetingRequest.php | UTF-8 | 834 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Nascom\TeamleaderApiClient\Request\Meeting;
use Nascom\TeamleaderApiClient\Request\AbstractPostRequest;
/**
* Class RetrieveMeetingRequest
*
* @package Nascom\TeamleaderApiClient\Request\Meeting
*/
class RetrieveMeetingRequest extends AbstractPostRequest
{
/**
* RetrieveMeetingRequest co... | true |
6f36f01f75e832b96038ea268e5133ec77aaefe2 | PHP | szembeszomszed/php-course | /MySQL/mysql_update_0728.php | UTF-8 | 921 | 2.625 | 3 | [] | no_license | <?php
mysql_connect("localhost", "root", "") or die("csatlakozás sikertelen, mert: ".mysql_error());
mysql_select_db("tesztdb") or die(mysql_error());
// egy adott rekord értékét az UPDATE utasítás segítségével tehetjük meg
// módosítsuk Mekk Elek korát 21-ről 22-re
// itt most minden 21 éves ember korát m... | true |
2bf9572f5598173ad79f81607289f2aad38547ff | PHP | athend/haggle | /core/functions/general.php | UTF-8 | 1,211 | 2.65625 | 3 | [] | no_license | <?php
function email($to, $subject, $body){
require_once "Mail.php";
$from = '<psblesson@gmail.com>';
$headers = array(
'From' => $from,
'To' => $to,
'Subject' => $subject
);
$smtp = Mail::factory('smtp', array(
'host' => 'ssl://smtp.gmail.com',
'port' => '465',
'... | true |
734bc18c78bba2f9a3e9ee7b99b80b865be7ec38 | PHP | samuelcolburn/cs142 | /assignment7-version-three/pet.php | UTF-8 | 8,950 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
//this is a page to display a product.
include "top.php";
print "<main id=main>";
$debug = false;
if (isset($_GET["debug"])) { // ONLY do this in a classroom environment
$debug = true;
}
if ($debug)
print "<p>DEBUG MODE IS ON</p>";
//get username
if (isset($_GET["id"])) {
//sanitize username
$PetID =... | true |
794f5140fafd1744d35f7084bddddfe083495c91 | PHP | CodyAslett/CS213 | /assignments/Prove/week 7/addRecipe.php | UTF-8 | 2,935 | 2.609375 | 3 | [] | no_license | <?php
session_start();
require('dbConnect.php');
$db = get_db();
$userName = "";
if(isset($_SESSION["user"]))
{
if($_SESSION["user"] != 0)
{
$userID = $_SESSION["user"];
$dbRequestCreatorName = $db->query("SELECT display_name from users WHERE id = $userID");
$user = $dbRequestCreatorName-... | true |
3fef28d7d924789b914e5e5808642034cd74e879 | PHP | wilmer2/castor-backend | /app/Http/Controllers/UserController.php | UTF-8 | 3,204 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Models\User;
use App\Models\Role;
use Validator;
class UserController extends Controller {
private $validatorMessages = [
'name.required' => 'El nombre es obligatorio',
'email.required' => 'El correo es obli... | true |
d1c4d77cbfdde67198cafc70200f3938a403d517 | PHP | faris17/bantuanbencana | /app/Models/M_user.php | UTF-8 | 1,751 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Models;
use Resources;
class M_user {
public function __construct(){
// DB koneksi default
$this->db = new Resources\Database;
$this->request = new Resources\Request;
$this->tb = "users"; //nama tabel database
}
public function login($user,$pw){
$query = $this->db->results("... | true |
db9fa5a49b7eb575728d0224daa2f04ec50ff6a7 | PHP | LOCKD2016/tcm | /database/factories/ModelFactory.php | UTF-8 | 5,719 | 2.59375 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | true |
069eedcfe49847a9b80729283289408b4a0604d3 | PHP | Sylvie-B/live_DataBase | /class-static/Utilisateurs-static.php | UTF-8 | 142 | 2.515625 | 3 | [] | no_license | <?php
class UtilisateursStatic {
private ?PDO $db;
public function getUtilisateurs() {
$this->db = DB::getLink();
}
}
| true |
8123d763043eb933f7c19c695b3ca01f0497e080 | PHP | itsdenispavlovic/socialsportblog | /makefolder.php | UTF-8 | 3,169 | 3.296875 | 3 | [] | no_license | <?php
include 'conn.php';
//The name of the directory that we need to create
//$directoryname = '/users/{username}/images/profilepics'
//We store here the uploaded images
//get username
try
{
$st = $conn->prepare('SELECT * FROM users WHERE id = :uid');
$st->bindParam(':uid', $_SESSION['user'], PDO::PARAM_STR);
$st-... | true |
85dfe8785c22386f90362c5eb7165478934cc80b | PHP | wnvzyming/data-struc | /leecode/profit.php | UTF-8 | 304 | 3.171875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wnvzyming
* Date: 2019/4/16
* Time: 3:29 PM
*/
class Solution {
/**
* @param Integer[] $prices
* @return Integer
*/
function maxProfit($prices) {
}
}
$Solution = new Solution();
print_r($Solution->maxProfit([-10,-5,0,3,9])); | true |
4a5a177d5a52a2e15bb0886cf192c39e59772eca | PHP | PanosGr94/PSProject | /includes/login.php | UTF-8 | 1,932 | 2.734375 | 3 | [] | no_license | <?php
//@include_once ("connect.php");
session_start(); // Starting Session
$message=''; // Variable To Store Error Message
$login_html ='<button class="btn btn-secondary" type="button"
onclick="location.href=\'login_front.php\';">'
.'Login'.'</button>';
if (isset($_POST['login']... | true |
7d96805ce13aed2c7354df95e70b0bcaa584f7be | PHP | epadua/epadua.github.io | /myshop.euterpadua/exercises/dadosvitais.php | UTF-8 | 632 | 2.625 | 3 | [] | no_license | <html>
<meta charset="UTF-8">
<script>
var pulaLinha = function () {
document.write("<br>");
}
var mostra = function (frase) {
document.write(frase);
pulaLinha();
pulaLinha();
}
var nome = prompt("Qual o seu nome?");
mostra("Bem vindo " + nome + "!");
var id... | true |
3330836a91f56c9d78045573b74f824fa3479d32 | PHP | mahi-kabir/basic-php-2 | /getter.php | UTF-8 | 743 | 3.640625 | 4 | [] | no_license | <?php
class Cars{
public $name;
private $mail;
function __construct($aName, $aMail){
$this-> name = $aName;
$this -> mail = $aMail;
}
public function addFriend(){
return "$this->mail added a new friend";
}
//getters
function getMail(){
return... | true |
72fda1ff1664a3374b82613086df6df5d9c4cf8f | PHP | pawel956/ppe4 | /src/Service/MarqueService.php | UTF-8 | 870 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Marque;
use Doctrine\ORM\EntityManagerInterface;
class MarqueService
{
protected $em;
protected $repository;
/**
* MarqueService constructor.
*
* @param EntityManagerInterface $em by dependency injection
*/
public function __construct(E... | true |
db65b0261bd93dcf4454666d810c99e8715957cf | PHP | merrazurizing/Patrones-Diseno-Web | /API_PATRONES/patrones/Composite/models/EmpresaMatriz.class.php | UTF-8 | 630 | 3.015625 | 3 | [] | no_license | <?php
namespace Composite;
require_once 'Empresa.class.php';
class EmpresaMatriz extends Empresa
{
/**
*
* @var "Lista de Empresa"
*/
protected $filiales = array();
public function agregaFilial(Empresa $filial)
{
$this->filiales[] = $filial;
return true;
}
... | true |
bdf91d7643477bf434531e2b67436606037522ba | PHP | andersonfariasba/gw | /application/models/dao/rh_cargosdao.php | UTF-8 | 3,090 | 2.6875 | 3 | [] | no_license | <?php
/* Classe(DAO): Perfil de usu�rios
* Autor: Anderson Farias
* Última atualização: 26/06/2015
* Contato: andersonjfarias@yahoo.com.br
*/
class Rh_cargosDao extends CI_Model {
public function connect(){
$this->load->database();
}
public function disconnect(){
$this->db->close();
... | true |
36ce0d154401613b64230ed37d61014b679f1cd1 | PHP | tawfekov/ZF2EntityAudit | /src/ZF2EntityAudit/Audit/Manager.php | UTF-8 | 1,266 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace ZF2EntityAudit\Audit;
use Doctrine\Common\EventManager;
use Doctrine\ORM\EntityManager;
use ZF2EntityAudit\EventListener\CreateSchemaListener;
use ZF2EntityAudit\EventListener\LogRevisionsListener;
/**
* Audit Manager grants access to metadata and configuration
* and has a factory method for audit ... | true |
8a4d6992072285821e429a7ce25c9de4945cbc38 | PHP | mkorniie/PHP | /Rush01/Obstacle.class.php | UTF-8 | 614 | 3.46875 | 3 | [] | no_license | <?PHP
Class Obstacle{
public $height;
public $width;
public $pos_x;
public $pos_y;
public static $verbose = False;
public function __construct($h, $w, $x, $y){
$this->height = $h;
$this->width = $w;
$this->pos_x = $x;
$this->pos_y = $y;
if (self::$verbose) {
print("Obstacle was created: " . $h . " ... | true |
45f290146e159248b7479b5dbb3b212beff0faed | PHP | mrchuguy/online_store | /library/UsersModel.php | UTF-8 | 842 | 2.984375 | 3 | [] | no_license | <?php
class UsersModel {
private $db;
public function __construct() {
$this->db= new mysqli(HOST, LOGIN, PASS, NAME);
}
public function delUser($id) {
$query = 'delete from users where id=' . "$id";
$this->db->query($query);
}
public function addUser($login, $password)... | true |
5654886ec24bebada929dff469c4d2a2e4993000 | PHP | jbroadway/template-bench | /handlers/raw.php | UTF-8 | 785 | 2.71875 | 3 | [] | no_license | <?php
// show plain text output
$page->layout = false;
header ('Content-Type: text/plain');
// our data structure
$data = array (
'title' => 'People List',
'show_people' => true,
'people' => array ('Mandy', 'Mindy', 'Moody')
);
// escape function for raw output
function escape ($val, $charset = 'UTF-8') {
return... | true |
7f5b942db6b9529a1ead21fd3c5c3c2543a26141 | PHP | cookpan001/Pipeline | /Handler.php | UTF-8 | 732 | 2.671875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace cookpan001\Pipeline;
class Handler
{
/**
* @var Server
*/
private $server;
public $timers;
public function __construct($server)
{
$this->server = $server;
$this->timers = array();
}
public function redis($name, ...$arugments)
{
li... | true |
72e85cd3a6f3e720eae21c239683851078b157ed | PHP | cristianomg10/beach | /vendor/markrogoyski/math-php/src/Probability/Distribution/Continuous/Cauchy.php | UTF-8 | 2,907 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace MathPHP\Probability\Distribution\Continuous;
use MathPHP\Functions\Special;
use MathPHP\Functions\Support;
/**
* Cauchy distribution
* https://en.wikipedia.org/wiki/Cauchy_distribution
*/
class Cauchy extends Continuous
{
/**
* Distribution parameter bounds limits
* p ∈ [0,1]
* ... | true |