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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
78e620177ec1fff2ff51081cd1e7b1aa2cd97a87 | PHP | paxappturbo/blogSymfony | /src/Pax/BlogBundle/Controller/BlogController.php | UTF-8 | 4,279 | 2.8125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Pax\BlogBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Pax\BlogBundle\Entity\Article;
use Pax\BlogBundle\Form\ArticleType;
class BlogController extends Controller
{
public function indexAction($page)
{
//creatio... | true |
4aee9002048b51c24099d6de9ca7e8d8d55df121 | PHP | j1kazy/themedev-twitter-from-scratch | /development/www/common/common.php | UTF-8 | 7,630 | 2.8125 | 3 | [] | no_license | <?php
require_once(__DIR__.'/loginCheck.php');
// 定数群
define ("URL", (empty($_SERVER['HTTPS']) ? 'http://' : 'https://').$_SERVER['HTTP_HOST']);
define ("SALT", "ezZundE1qnLZJ84s4SE2");
// 1ページに表示する件数
define ("VIEW_RECORDS", 10);
// ヘッダーの表示
// タイトル省略可能
// 第二引数 true:ログインバー表示、 false:ログインバー非表示 デフォルトtrue
function view... | true |
11f4072f08bf8aea9a6bab4bc5fb67dbbc481a94 | PHP | Offstavo/php | /php_hello/php_echoVsprint/php_echoVsprint_three.php | UTF-8 | 223 | 3.515625 | 4 | [] | no_license | <?php
// this code generates an error because echo does not return a value
$lang = "PHP";
$ret = echo $lang."is a web development language";
echo "</br>";
echo "Value return by echo statement:".$ret;
?> | true |
dd4e8b66fc184dbe0060d242df60bfb1e607272e | PHP | antonMaslennikov/tt | /protected/models/File.php | UTF-8 | 4,694 | 2.796875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "tt_files".
*
* The followings are the available columns in table 'tt_files':
* @property integer $id
* @property string $path
*/
class File extends CActiveRecord
{
/**
* округлённое значение размера файла
*/
var $size_rounded;
/**
* оригинальное название ф... | true |
a739094c8dc0e3f2a77e3d062a1d12ab2fddf0e8 | PHP | Ragingflow/WEB-development-course | /PHP Course/mvc_procedure/view.php | UTF-8 | 340 | 2.921875 | 3 | [] | no_license | <?php include 'controller.php'; ?>
<html>
<head>
<link rel="stylesheet" href="style.css" /> </head>
<body>
<?php
echo $output;
if(is_string($dbresult)){
echo $dbresult;
}
else{
foreach ($dbresult as $record) {
foreach ($record as $k => $v) {
echo $k . ": " . $v . "<br>";
}
}
... | true |
14cc1074141c852f1e1283ed958d293d27d9bacb | PHP | surereddy/arduino-outboundcall | /arduino-outboundcall.php | UTF-8 | 1,566 | 2.71875 | 3 | [] | no_license | <?php
// Arduino Call
// Modified By: Dan Wagoner - www.nerdybynature.com
// Date: 08/31/09
// A script written to create a call for asterisk file when accessed. The
// original intent is to have an arduino connect, triggereing a phone call.
$remote_ip=$_SERVER["REMOTE_ADDR"];
// Change the values below to r... | true |
59dff926e3b21e0961d131a766101147f93e4941 | PHP | alioygur/curl | /tests/CurlTest.php | UTF-8 | 3,078 | 2.59375 | 3 | [] | no_license | <?php
class CurlTest extends PHPUnit_Framework_TestCase {
private $curl;
private $testUrl = 'http://example.com';
public function setUp()
{
$this->curl = new \Alioygur\Curl\Curl();
}
public function testHeadMethod()
{
$response = $this->curl->head($this->testUrl);
... | true |
9a1d3a3f93578d1026c6355f14b524478f799f33 | PHP | thunderlol/animal | /adicionar-anuncio-animais.php | UTF-8 | 9,447 | 2.6875 | 3 | [] | no_license | <?php
session_start();
// if user is not logged in
if( !$_SESSION['loggedInUser'] ) {
// send them to the login page
header("Location: login.php");
}
// connect to database
include('includes/connection.php');
// include functions file
include('includes/functions.php');
// if add button was submitt... | true |
492d1e1f74d61e8106c8cdd9eb7610ed0bba2d9e | PHP | AnujaVinod/waterrevenuemangmtsoftware | /app/Models/LogNameChange.php | UTF-8 | 1,274 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\User;
use DB;
class LogNameChange extends Model
{
protected $fillable = [
'sequence_no','old_val','updated_val','order_no','reason','approved_by','document','operation','date','updated_by'
];
/**
* The table associa... | true |
2928d312ed1c272bbc9872b24321c39d27cde846 | PHP | OscarBermudez17/Proyecto_Granja_Villegas | /DemoGrangaVillegas/Producto/data/conexion.php | UTF-8 | 899 | 2.546875 | 3 | [] | no_license | <?php
//echo 'Llega a la clase conectar <br>';
class conectar{
function con(){
//echo 'Entra al metodo de conectar con() <br>';
// echo "Llega el metodo con <br>";
/* $user='root';
$password='1234';
$db='granja_villegas';
$port='3306';
... | true |
74e0b3ec2ac69cddb18126ff36ca17daf6d42c4a | PHP | moab-tech/procore-php-sdk | /src/Api/Core/Company/Trades.php | UTF-8 | 1,919 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
declare(strict_types=1);
namespace MoabTech\Procore\Api\Core\Company;
use MoabTech\Procore\Api\ApiInterface;
use MoabTech\Procore\Api\CompaniesAbstractApi;
use MoabTech\Procore\HttpClient\Util\UriBuilder;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
cla... | true |
a2f6b85f100215860abde9541c502f1e6b66240c | PHP | 68publishers/image-bundle | /src/Storage/TDataStorage.php | UTF-8 | 1,805 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace SixtyEightPublishers\ImageBundle\Storage;
use SixtyEightPublishers;
trait TDataStorage
{
/** @var \SixtyEightPublishers\ImageBundle\Storage\Options\Options|NULL */
private $options;
/** @var \SixtyEightPublishers\ImageBundle\Storage\Manipulator\IManipulator[] */
privat... | true |
e63837dbb9caf55521ee7c0f8ae2127903fc6e0d | PHP | c-harris/ODataMetadata | /src/Interfaces/IPrimitiveType.php | UTF-8 | 569 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AlgoWeb\ODataMetadata\Interfaces;
use AlgoWeb\ODataMetadata\Enums\PrimitiveTypeKind;
use AlgoWeb\ODataMetadata\Helpers\Interfaces\IPrimitiveTypeHelpers;
/**
* Interface IEdmPrimitiveType.
*
*Represents a definition of an EDM primitive type.
*
* @package AlgoWeb\ODataMet... | true |
148e555e93a71e0150bee4c051f6e875d3e89510 | PHP | manuelguarniz/WebNobPhp | /includes/conexion.inc.php | UTF-8 | 778 | 2.5625 | 3 | [] | no_license | <?php
// Database settings
// database hostname or IP. default:localhost
// localhost will be correct for 99% of times
define("HOST", "localhost");
define("DBUSER","biosegur_admin");// "biosegur_root");
define("PASS", "bio.intranetbd");//root_2011");
define("DB","biosegur_intranet");//biosegur_bioseg");
############... | true |
4a8830ba603b9e63c6d41b35f9c7b0dc06035a84 | PHP | pcorletto/OrderClientApp | /app/src/main/register.php | UTF-8 | 1,362 | 2.625 | 3 | [] | no_license | <?php
require "init.php";
$username=$_POST["username"];
$password=$_POST["password"];
$firstname=$_POST["firstname"];
$lastname=$_POST["lastname"];
$email=$_POST["email"];
$address=$_POST["address"];
$city=$_POST["city"];
$state=$_POST["state"];
$zipcode=$_POST["zipcode"];
$telephone=$_POST["telephone"];
$mobile=$_POS... | true |
6d9a390e723c314edd06b3016f36a277d1040c76 | PHP | ReneGustavo/cafuringa_imoveis | /model/app.control/ListarFotos.class.php | UTF-8 | 707 | 2.671875 | 3 | [] | no_license | <?php
class ListarFotos
{
private $conn;
public function __construct()
{
TTransaction::open("conecta");
TTransaction::setLogger(new TLoggerTXT("ListarFotos.txt"));
}
public function show()
{
try
{
$id = $_GET['id'];
$conn = TTransaction::get();
$sql = "SELECT id, tipo FROM fotos... | true |
2e7757280aa0b413503a06233c048b26b1f37326 | PHP | ZF2Buch/kapitel22 | /module/Shop.final/src/Shop/Service/BasketService.php | UTF-8 | 3,624 | 2.90625 | 3 | [] | no_license | <?php
/**
* ZF2 Buch Kapitel 22
*
* Das Buch "Zend Framework 2 - Von den Grundlagen bis zur fertigen Anwendung"
* von Ralf Eggert ist im Addison-Wesley Verlag erschienen.
* ISBN 978-3-8273-2994-3
*
* @package Shop
* @author Ralf Eggert <r.eggert@travello.de>
* @copyright Alle Listings sind urheberre... | true |
25632d410f0e0fa995bb9e95fbe40ee0705b21e9 | PHP | phossa2/query | /tests/Query/Dialect/Mysql/SelectTest.php | UTF-8 | 24,914 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Phossa2\Query;
/**
* select test case.
*/
class SelectTest extends \PHPUnit_Framework_TestCase
{
/**
*
* @var Builder
*/
private $object;
/**
* Prepares the environment before running a test.
*/
protected function setUp()
{
parent::setUp();
... | true |
7ff128215b42904d2fd9df08fad7009053c6e057 | PHP | Daniela77/Guia_Profesores | /model/profesorModel.php | UTF-8 | 4,145 | 2.6875 | 3 | [] | no_license | <?php
include_once "model/model.php";
class ProfesorModel extends Model{
function getProfesor($id_profesor){
$consulta = $this->db->prepare( "SELECT * from profesor where id_profesor=?");
$consulta->execute(array($id_profesor));
return $consulta->fetch(PDO::FETCH_ASSOC);
}
... | true |
c8e3a621243352947c50efac06f5e82fb6bb463d | PHP | SamuelGoulart/Icatalogo | /categorias/categoriasAcao.php | UTF-8 | 1,467 | 2.890625 | 3 | [] | no_license | <?php
session_start();
require("../database/conexao.php");
function validaCampos(){
$erros = [];
if (!isset($_POST["descricao"]) || $_POST["descricao"] == "") {
$erros[] = "O campo descrição é obrigatório";
}
return $erros;
}
switch ($_POST["acao"]) {
case 'inserir':
$err... | true |
7ce9cc98009df9b4d5a6b922acc60306e151ec81 | PHP | canwdev/learn-php | /init-php/index.php | UTF-8 | 562 | 3.90625 | 4 | [] | no_license | <?php
// 向网页输出内容
echo '<h1>Hello PHP</h1>';
// 向网页输出内容
print "<h1>我要学习 PHP!</h1>";
// 弱类型变量
$n1 = 5;
$n2 = 7;
// 计算
$result = $n1 + $n2;
echo $result;
$arr = [1, 2, 3, 4, 5, 6];
// 向console输出数据
debug_to_console($arr);
// 向网页输出内容+变量
print "<h1>{$n1}内容,{$arr[1]}</h1>";
function debug_to_console($data)
{
$outpu... | true |
81f984030fcc2b22c2680ca3f2bd48367fd4121b | PHP | web-developer93/shopify-test | /models/ProductVariants.php | UTF-8 | 3,696 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use app\components\DateTransform;
use Yii;
/**
* This is the model class for table "tbl_product_variants".
*
* @property int $id
* @property int $product_id
* @property string $title
* @property double $price
* @property string $sku
* @property int $position
* @property string $in... | true |
7b1b8565c6afc775d24300ab4a1b9af6be108b86 | PHP | azole/ActionKit | /src/ActionKit/Result.php | UTF-8 | 7,551 | 2.671875 | 3 | [] | no_license | <?php
namespace ActionKit;
use Exception;
use ActionKit\Messages;
class Result
{
/**
* @var string success, error
*/
public $type; // success, error, valid, invalid, completion, redirect
/**
* @var array argument array
*/
public $args; // arguments to actions.
/**
* @va... | true |
6a6c12826e457c80364f39aa32edf55f9440261a | PHP | dartodinus/system | /library/CI/libraries/Smarty.php | UTF-8 | 1,994 | 2.65625 | 3 | [] | no_license | <?PHP if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once( THIRDPATH.'/smarty/libs/Smarty.class.php' );
class CI_Smarty extends Smarty {
public function __construct(){
parent::__construct();
$this->error_reporting = E_ALL & ~E_NOTICE;
$this->debugging = true;
$thi... | true |
65205a4e1bf0d80b44bebd462bd22950bde24b30 | PHP | Xedecimal/xedlib-dev | /xedlib20/lib/a_editor.php | UTF-8 | 19,614 | 2.859375 | 3 | [] | no_license | <?php
/**
* Enter description here...
*/
class DisplayColumn
{
/**
* Text of the column in the display table.
*
* @var string
*/
public $text;
/**
* Name of the associate dataset column.
*
* @var string
*/
public $column;
/**
* Callback function for evaluating this cell for... | true |
680e64d80709b72f6b0d8f826a67e4c59437ac29 | PHP | JMSOFTCR/SISAE_APP | /Modelo/GradoCl12.php | UTF-8 | 1,011 | 2.59375 | 3 | [] | no_license | <?php
include 'Conexion.php';
class GradoCl12
{
private $PStCl12_IdGrado;
private $PStCl12_NombreGrado;
private $PStCl12_IdBachiller;
public function GradoCl12($IdG, $NomG, $IdB)
{
$this->PStCl12_IdGrado = $IdG;
$this->PStCl12_NombreGrado = $NomG;
$this->PStCl12_IdBachiller = $IdB;
}
public functi... | true |
21f71d6f112645701a7fca6c542f6cb8500b39f0 | PHP | mamay86/ITEA-Serializer | /tests/JsonSerializerTest.php | UTF-8 | 1,410 | 2.625 | 3 | [] | no_license | <?php
namespace Greeflas\Serializer\Tests;
use Greeflas\Serializer\JsonSerializer;
use Greeflas\Serializer\SerializerInterface;
use Greeflas\Serializer\Tests\Fixtures\Sample;
use PHPUnit\Framework\TestCase;
final class JsonSerializerTest extends TestCase
{
/**
* @var JsonSerializer
*/
private $seriali... | true |
302ed03ee21b3d89c1eecafecf894a37ee26e0dc | PHP | felipedesQ/whizz-photo-gallery | /src/Entity/CategoryEntity.php | UTF-8 | 579 | 2.671875 | 3 | [] | no_license | <?php
namespace Whizz\Gallery\Entity;
use Whizz\SharedObject\Entity\BaseEntity;
/**
* @ORM\Entity(repositoryClass="Whizz\Gallery\Repository\CategoryRepository")
* @ORM\Table(
* name="categories"
* )
*/
class CategoryEntity extends BaseEntity
{
/**
* @var string|null
*
* @ORM\Column(type... | true |
f58aa8c7086bf1b7c000e823a9654a8d00bfc851 | PHP | codertariq/tekmarks | /app/Http/Controllers/configuration/LocaleController.php | UTF-8 | 5,813 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Configuration;
use Illuminate\Http\Request;
use App\Http\Requests\Configuration\LocaleRequest;
use App\Repositories\Configuration\LocaleRepository;
use App\Http\Controllers\Controller;
class LocaleController extends Controller
{
protected $repo;
protected $request;
p... | true |
cdab29bae8e6040d4a0d9bab4ef0e77b9af118a7 | PHP | hi-noikiy/code-1 | /app/Http/Utils/HttpUtil.php | UTF-8 | 10,676 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Utils;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Redis;
/**
* fyj
* 20160629
* 公共函数类
*/
class HttpUtil
{
/**
* 返回 json
* fyj
* @param [type] $data 数据
* @param [type] $msg 提示信息
* @param [type] $status 成功 或者 失败
*/
public static function retrun_json($da... | true |
8e1ba75e4c29257b103692657eac3c3e2e163936 | PHP | wcharlesm/FrontendFamlyTree | /rest/PersonSearch.php | UTF-8 | 1,071 | 2.765625 | 3 | [] | no_license | <?php
require_once("../config/config.php");
include(ENV_PATH."RestIOC.php");
/*
$familyEvents = new SqlEventFactory($familyDb);
$familyNotes = new SqlNoteFactory($familyDb);
$familyPeople = new SqlPersonFactory($familyDb);
$familyRelations = new SqlRelationFactory($familyDb);
*/
/*
Person Interface
public functi... | true |
82b2076e71c6034f28572159dd27a2c84ffcdea4 | PHP | JeffFrade/exemplo-sistema-cliente | /functions/db.php | UTF-8 | 1,159 | 2.734375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/conn.php';
function searchClients(string $search = "")
{
$conn = connect();
$sql = "SELECT * FROM clientes";
if (!empty($search)) {
$sql .= "";
}
$res = mysqli_query($conn, $sql);
$table = "";
while ($row = mysqli_fetch_assoc($res)) {
$mat... | true |
82316c7e267ee203cf4bf633450f47a1a62705a3 | PHP | nanjingboy/clown | /test/src/ColumnTest.php | UTF-8 | 5,791 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Src;
use Clown\Column;
use PHPUnit_Framework_TestCase;
class ColumnTest extends PHPUnit_Framework_TestCase
{
private static $_column;
public static function setUpBeforeClass()
{
self::$_column = Column::instance();
}
public function testParseFromDatabase()
{
... | true |
50f71b113e3f7325bbfb65e4ce2ba19a9663457d | PHP | yohanes-ai/travelgo-webservice | /admin/user.php | UTF-8 | 8,593 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
include "../controller/connection.php";
$sql="select * from m_user where email!='admin@admin.com'";
$query=mysqli_query($conn,$sql);
$arrUser=[];
while($row = mysqli_fetch_assoc($query)){
$sql="select * from m_tour where user_id=".$row['id'];
$query1=mysqli_query($conn,$sql);
$row['tour']=m... | true |
59ebdfb909f9a0b0cd6507118139425b9f15f434 | PHP | Rahkaz/cis355 | /password.php | UTF-8 | 325 | 2.765625 | 3 | [] | no_license | <?php
function password_generate($chars)
{
$data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';
return substr(str_shuffle($data), 0, $chars);
}
echo password_generate(12)."\n";
$my_file = 'file.txt';
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file);
?> | true |
3cfdc088c2dfa4344fdae2ee3758adfb296bc0b2 | PHP | alexander-pecherskih/bridges | /backend/src/Model/Process/Entity/Ticket/NodeFieldValue.php | UTF-8 | 988 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Model\Process\Entity\Ticket;
use App\Model\Process\Entity\Node\NodeField;
use App\Model\Ticket\Entity\Ticket\ValueInterface;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\UuidInterface;
/**
* Class NodeFieldValue
* @package App\Entity\Ticket
*
*/
class NodeFieldValue
{
/**
* @ORM\... | true |
5da616e0790d7330843172c1123b160f60033158 | PHP | gcoronelc/EMPRENDEDORES_2016_1 | /GAW/Demo014/index.php | UTF-8 | 771 | 2.609375 | 3 | [] | no_license | <?php
require './lib/libreria.php';
$msg = "";
if (isset($_REQUEST["btnProcesar"])) {
// Datos
$usuario = $_REQUEST["usuario"];
$clave = $_REQUEST["clave"];
// Proceso
$code = validar($usuario, $clave);
if($code == 1){
header("location: main.php");
} else {
$msg = "Datos incorrectos.";
}
... | true |
34b34b1b77e27ac6000f84105b8069904fb77613 | PHP | bokko79/servicemapp | /common/models/ProviderComments.php | UTF-8 | 1,577 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "provider_comments".
*
* @property string $id
* @property string $provider_id
* @property string $reviewer
* @property string $text
* @property string $status
* @property string $time
*
* @property User $reviewer0
* @property ... | true |
666646d2b3045c060e6702b50e41d38fabcee6cd | PHP | mattharris5/sectionmaster | /register/admin/section/users.php | UTF-8 | 2,297 | 2.59375 | 3 | [
"MIT"
] | permissive | <?
$title = "Section > Authorized Users";
require "../pre.php";
$user->checkPermissions("users");
// delete user if requested
if ($_REQUEST['command'] == 'delete' && $_REQUEST['uid'] != '') {
$user->checkPermissions("users", 5, "You cannot delete users without full permissions on the users table.");
$del = $user->db... | true |
8d83abb406b8eb48d38d98ac66a101a4d4a18bd7 | PHP | Pipiro/ProjetLOL | /Source/index.php | UTF-8 | 2,350 | 2.5625 | 3 | [] | no_license | <?php
require 'required.php';
//onglet actif
$activeTab = "index";
//on récupére les teams
$tm = new PdoTeamsManager();
$teams = $tm->getTeams();
$pttm = new PdoPlayersToTeamManager();
$pm = new PdoPlayersManager();
//$players = $pm->getActivesPlayers();
?>
<!DOCTYPE html>
<htm... | true |
751afb754d3566665b5cccee8cca38bfbe30d198 | PHP | Nightraceer/vc | /src/DataManager/EntityFactory/EntityFactoryInterface.php | UTF-8 | 608 | 2.765625 | 3 | [] | no_license | <?php
namespace TestWork\DataManager\EntityFactory;
use TestWork\DataManager\Entity\EntityInterface;
interface EntityFactoryInterface
{
/**
* @param array $array
* @return EntityInterface
*/
public function factory(array $array): EntityInterface;
/**
* @param array $array
* @r... | true |
63dd88788eb4bd420d28cfd287b55f6e16cfed16 | PHP | DHAteam/WebProject | /qldh.php | UTF-8 | 2,326 | 2.515625 | 3 | [] | no_license | <?php require_once 'config.php' ?>
<?php if (!$currentUser) : ?>
<center>
<h1>Bạn Chưa Đăng Nhập!</h1>
<br><a href="admin.php">Click vào đây để đăng nhập</a>
</center>
<?php endif; ?>
<?php if ($currentUser) : ?>
<?php include"headerad.php" ?>
<?php
$sql="SELECT * from dathang order by NgayTao ... | true |
a63783f9c045124d4bdd42572e638e722f83bf81 | PHP | GabeStah/sylius-ecommerce | /src/Service/Importer/DealerImporter.php | UTF-8 | 2,674 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Service\Importer;
use App\Entity\Dealer;
use App\Repository\DealerRepository;
use App\Service\Logger;
use App\Service\StringNormalizer;
use Doctrine\DBAL\Exception;
use Sylius\Bundle\TaxonomyBundle\Doctrine\ORM\TaxonRepository;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* ... | true |
b183512115801306d3417ab0591a669ccdc4442b | PHP | terrylinooo/ironman-game | /day-19/src/SimpleCache/CacheWarmingTrait.php | UTF-8 | 951 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Shieldon Simple Cache package.
*
* (c) Terry L. <contact@terryl.in>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Shieldon\SimpleCache;
/**
* For Cache Dr... | true |
04474b0cbe39afb0a5f456bcc51dfcea3433633d | PHP | haruyaono/jobcinema-prod | /app/Job/JobItems/Repositories/JobItemRepository.php | UTF-8 | 4,810 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Job\JobItems\Repositories;
use App\Models\JobItem;
use Jsdecena\Baserepo\BaseRepository;
use App\Job\JobItems\Repositories\Interfaces\JobItemRepositoryInterface;
use App\Job\JobItems\Exceptions\JobItemNotFoundException;
use App\Job\JobItems\Exceptions\JobItemCreateErrorException;
use App\Job\JobIt... | true |
855566580fc0c0585f166ff52558a18bdde6a3b2 | PHP | GustavoCavalcant/fullstackeletro | /backend/Models/Pedido.php | UTF-8 | 1,013 | 2.984375 | 3 | [] | no_license | <?php
require "./Connection.php";
class Pedido
{
public $id_pedido;
public $nome;
public $endereco;
public $telefone;
public $produto;
public $valor_unitario;
public $qtd;
public $valor_total;
public static function getAll()
{
... | true |
b3b269de71e1f94ab40dbf143790fe043e496826 | PHP | comvex/redaxo_prozer | /lib/xform/value/class.xform.value.pz_date_screen.inc.php | UTF-8 | 3,075 | 2.6875 | 3 | [] | no_license | <?php
class rex_xform_value_pz_date_screen extends rex_xform_value_abstract
{
function enterObject()
{
if (!$this->params['send'] && $this->getValue() == '' && $this->getElement(5) != '')
{
$this->setValue($this->getElement(5));
}
if(!is_array($this->getValue()))
{
$this->setValue(explode(",",... | true |
c261b60bab0b67a2bd1d3f7f405e2bf361407f80 | PHP | Celeste94/Practica | /modulos/validar/validar-agregar-persona.php | UTF-8 | 1,495 | 2.9375 | 3 | [] | no_license | <?php
include '../../include/conexion.php'; //include del php conexion para la base de datos
session_start();
if(isset($_POST['agregar'])){ //condicionales para validar traídos por metodo $_POST
$ape_y_nom = $_POST["ape_y_nom"];
$dni = $_POST["dni"];
$edad = $_POST["edad"];
... | true |
f16d772985561cfa9ddc256e1a8f2f96d1e1f96b | PHP | quickstrap/quickstrap | /holder/src/Subscribers/ComposerSetupSubscriber.php | UTF-8 | 2,585 | 2.6875 | 3 | [] | no_license | <?php
namespace QuickStrap\Subscribers;
use Composer\Command\InitCommand;
use Composer\IO\ConsoleIO;
use QuickStrap\Helpers\Composer\InitHelper;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\Conso... | true |
3586adf18fd0fd648e48126c51fa069cdc237a65 | PHP | Optimovl/optimosite | /templates/optimo/php/mail/mailer.php | UTF-8 | 1,711 | 2.546875 | 3 | [] | no_license | <?php
$subject = htmlspecialchars($_POST["Optimo"]);
$name = htmlspecialchars($_POST["name"]);
$phone = htmlspecialchars($_POST["phone"]);
$from = htmlspecialchars($_POST["email"]);
$message = htmlspecialchars($_POST["message"]);
$file = $_FILES["file"];
$to = 'nikita.khovanskiy@gmail.com';
//sender
$fromName = 'Web... | true |
daa83617eb4553f8a382772b9e7f2c46b9ff6995 | PHP | yehorherasymchuk/sample-laravel-structure | /app/Services/Companies/CompaniesService.php | UTF-8 | 1,594 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Description of CompaniesService.php
* @copyright Copyright (c) DOTSPLATFORM, LLC
* @author Yehor Herasymchuk <yehor@dotsplatform.com>
*/
namespace App\Services\Companies;
use App\Models\Company;
use App\Services\Companies\DTO\StoreCompanyDTO;
use App\Services\Companies\Exceptions\CompanyNotFoundEx... | true |
035d76f9e122dcbe37060333437e500583bdbad8 | PHP | jedi01/happybit | /hook_pyapal.php | UTF-8 | 428 | 2.625 | 3 | [] | no_license | <?php
session_start();
if(isset($_REQUEST['idpay_ten'])) {
$_SESSION['PIZ']="10";
}
if(isset($_REQUEST['idpay_twentyfive'])) {
$_SESSION['PIZ']="25";
}
if(isset($_REQUEST['idpay_fifty'])) {
$_SESSION['PIZ']="50";
}
if(isset($_REQUEST['idpay_hundred'])) {
$_SESSION['PIZ']="110";
}
if(isset($_REQUEST['idpay_twohundr... | true |
1d06bca4ec8c54aa58f4656ce9ba28732d888d19 | PHP | leprephp/cr | /src/NodeTypesManager.php | UTF-8 | 2,311 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Lepre package.
*
* (c) Daniele De Nobili <danieledenobili@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Lepre\Cr;
use Lepre\Cr\Client\ClientInt... | true |
96aec2b09659c4bd8cb6a5938139c9a577726c35 | PHP | KirillPerepelitsa/lio | /src/App/Deploy/Laravel.php | UTF-8 | 6,994 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Console\App\Deploy;
use Console\App\Commands\Files\FilesDeleteCommand;
use Console\App\Commands\Files\FilesUpdateCommand;
use Dotenv\Dotenv;
use Exception;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\GuzzleException;
class Laravel extends DeployAbstract
{
const SKIP_COMMANDS ... | true |
7195f01e6fa5b2986d4d2b715f983a146082a591 | PHP | davichos/rstws | /library/ZendX/XmlManipulator/XML/XMLManipulator.php | UTF-8 | 4,075 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class to manipulate files XML NOTE: improvement class
* @package XmlManipulator
* @subpackage XML
* @author Davdi Gomez
* @uses ZendX_XmlManipulator_XML_FileXML
*/
class ZendX_XmlManipulator_XML_XMLManipulator extends ZendX_XmlManipulator_XML_FileXML {
/**
* @method __construct
* @acce... | true |
79c2fa9dc7b7f533127bc36112e08f28a7f413d7 | PHP | majaz2017/laptopLoan | /private/KAASoft/Controller/Admin/ElectronicBook/ElectronicBookDatabaseHelper.php | UTF-8 | 2,309 | 2.75 | 3 | [] | no_license | <?php
/**
* Copyright (c) 2015 - 2018 by KAA Soft. All rights reserved.
*/
namespace KAASoft\Controller\Admin\ElectronicBook;
use KAASoft\Controller\DatabaseHelper;
use KAASoft\Database\Entity\General\ElectronicBook;
use KAASoft\Database\KAASoftDatabase;
/**
* Class BookDatabas... | true |
98401b44ce7a1970f4e30761c8767b872480e07b | PHP | richard457/phpBeginner | /usingOurFunction/lesson04.php | UTF-8 | 357 | 3.625 | 4 | [] | no_license | <?php
include 'lesson03.php';
$p=quotes();//here we are seeing new php builtin function to print array
/* in php when we need to print a single element of array we use foreach see example bellow */
foreach ($p as $quote => $value) {
# code...
$evaluate= $value;
}
for ($i=0; $i <2 ; $i++) {
# code...
ec... | true |
5d9ad9200d0077330874e9bb93dc64bb7ced7330 | PHP | mihaimatei/speedsteradvanced | /app/code/community/Fooman/SpeedsterAdvanced/Helper/Data.php | UTF-8 | 947 | 2.671875 | 3 | [] | no_license | <?php
class Fooman_SpeedsterAdvanced_Helper_Data extends Mage_Core_Helper_Abstract
{
public function normaliseUrl($url)
{
$url = trim($url);
if (empty($url)) {
return false;
}
//entries should have been entered without domain, but we try to remove the base url
... | true |
23b76ffc7ed297d5798577203dca31ac63db781e | PHP | adolfoeliazat/base-transport | /src/Geospatial/GeolocationAreaInterface.php | UTF-8 | 224 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Base\Geospatial;
interface GeolocationAreaInterface
{
/**
* @param GeolocationInterface $geolocation
* @return bool
*/
public function contains(GeolocationInterface $geolocation);
}
| true |
614576b93459c49320cb0b5f9a249f308e8606f3 | PHP | inviolable1/ChessBlog | /application/controllers/chat.php | UTF-8 | 3,590 | 2.8125 | 3 | [
"Artistic-2.0"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Chat extends CI_Controller {
private $view_data = array();
public function __construct(){
parent::__construct();
$this->load->model('Chat_model');
}
//SHOW ALL CHAT MESSAGES
public function index(){ //should include read_all ... | true |
a116a0cceb05944488775501ec0958ed59cf5463 | PHP | mgw2007/laravel_app | /app/Listeners/Transportation/Created.php | UTF-8 | 1,216 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners\Transportation;
use App\Events\Transportation\Created as CreatedEvent;
use App\Mail\NewSubmissionCreatedEmail;
use App\User;
class Created
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
... | true |
a8a04b9112548947ef1f8cbdaa9286d73e7d3fd4 | PHP | arron0/FormFactoryBuilder | /FormFactoryBuilder/IFormBuilder.php | UTF-8 | 566 | 2.59375 | 3 | [] | no_license | <?php
/**
* Requires PHP Version 5.3 (min)
*
* @package
* @subpackage
* @author Tomáš Lembacher <tomas.lembacher@seznam.cz>
* @license
*/
namespace Arron\FormBuilder;
use Nette\PhpGenerator\ClassType;
/**
* IFormBuilder interface definition
*
* @package
* @subpackage
* @author Tomáš Lembacher <tomas.lemb... | true |
0f05ca77d8cc769b2ec4b0e11aa1017bceb171de | PHP | SofiaFG/UniRent | /beta/db/user_auth_unirent.php | UTF-8 | 921 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// PHP file to insert a new User in DB
function register($firstName, $lastName, $emailAdress, $username, $password, $passwordAgain) {
// register new person with db
// return true or error message
// connect to db
$conn = db_connect();
// check if username is unique
$result = $conn->query("sele... | true |
6a6d8740ead8e1582433619b67014e5948a331d0 | PHP | diana-deliu/IngredientDaddy | /app/User.php | UTF-8 | 1,713 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace App;
use Codesleeve\Stapler\ORM\EloquentTrait;
use Codesleeve\Stapler\ORM\StaplerableInterface;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\... | true |
1a73f3d0460dc4e158006e373b3b0a7ddcc6ee45 | PHP | dzoxploit/olcourse-ci4 | /app/Helpers/my_timezone_helper.php | UTF-8 | 275 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
if(!function_exists('my_timezone'))
{
function my_timezone()
{
// default timezone menjadi Asia/Jakarta
$timezone = new DateTimeZone('Asia/Jakarta');
$date = new DateTime();
$date->setTimeZone($timezone);
return $date;
}
} | true |
4cd5e85119f00c98be28019a888faabf513734f3 | PHP | hamdani128/Youlanda | /app/Controllers/Audit/AuditController.php | UTF-8 | 2,863 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers\Audit;
use App\Controllers\BaseController;
class AuditController extends BaseController
{
public function index()
{
//
}
public function filter_sales()
{
$mulai = $_GET['mulai'];
$sampai = $_GET['sampai'];
$db = \Config\Database::co... | true |
4cd4b482c021c2c3ea2ab1974d2b7ee91ab6ce9c | PHP | CyrilLeblanc/PCP21 | /app/Validation.php | UTF-8 | 2,078 | 2.65625 | 3 | [] | no_license | <?php
// Validation des covoiturages de la veille et mise à jour des Nbr_Alveoles des covoitureurs ayant eu un covoiturage la veille.
require_once "../config.php";
#################################################
# Récupération des covoiturages effectué #
#################################################
/... | true |
b249d840975bae7b0e8412c5788967f4d2859b67 | PHP | oesleik/virtual-shelf | /public_html/api/v1/Services/Editoras.php | UTF-8 | 1,055 | 2.84375 | 3 | [] | no_license | <?php
namespace Services;
use Models\Editora;
class Editoras extends Services {
public function getAll($req, $res) {
$editoras = Editora::all();
return $this->parseResponse($res, $editoras);
}
public function get($req, $res) {
$id = $req->getAttribute("id");
$editora = Editora::find($id);
if ($editor... | true |
b9ac18f74d59a4a316bac8268a5d948bd8964e15 | PHP | juan-tabletech/tabletech | /Tabletech/Classes/OpenaidLoader.php | UTF-8 | 2,389 | 2.875 | 3 | [] | no_license | <?php
namespace Tabletech\Classes;
class OpenaidLoader
{
private $apiUrl;
private $country;
/**
* Class constructor
* @param string $country default country code
*/
public function __construct($country = 'SD')
{
$this->country = $country;
$this->apiUrl = 'http://dat... | true |
9a91abccc644318e34ecc7f33b4a7c03261b98ba | PHP | tanim05/iba-seip | /ibaseip/admin/schedule/loaddata.php | UTF-8 | 18,907 | 2.53125 | 3 | [] | no_license | <?php
require_once ("../../include/initialize.php");
global $mydb;
$idno = $_POST['IDNO'];
$classcode = $_GET['CLASSCODE'];
// $GRADEID = $_GET['GRADEID'];
// $sql = "SELECT * FROM `tblgrades` WHERE IDNO='{$idno}' AND CLASSCODE='".$classcode."' AND ACCOUNT_USERNAME='".$_SESSION['ACC... | true |
aa40c10e965d55f14ab72cba00fa189561a29099 | PHP | milejko/mmi | /tests/Mock/test-auth-provider.php | UTF-8 | 1,207 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Mmi Framework (https://bitbucket.org/mariuszmilejko/mmicms/)
*
* @link https://bitbucket.org/mariuszmilejko/mmicms/
* @copyright Copyright (c) 2010-2015 Mariusz Miłejko (http://milejko.com)
* @license http://milejko.com/new-bsd.txt New BSD License
*/
namespace Mmi\Test;
use Mmi\Security\A... | true |
b9c9efb9159ea77eed386232c51330249eb4332f | PHP | shoebhy/jumbo | /src/index.php | UTF-8 | 1,116 | 2.578125 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
//load all the classes
function load($folders){
foreach ($folders as $folder) {
foreach (scandir($folder) as $file) {
if ((substr( $file, 0, 2 ) !== '._') && preg_match( "/.php$/i" ,... | true |
0ad8c2823eaf8334191cf0832c34fa2fa37a6fc5 | PHP | xy3/modern-website | /index.php | UTF-8 | 1,014 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'vendor/autoload.php';
require_once 'assets/php/functions.inc.php';
require_once 'assets/php/sql.inc.php';
require_once 'assets/php/template_engine.inc.php';
$router = new AltoRouter();
//================ Routes ==================
// show_page function takes the name of "views/{na... | true |
77342ecfcd15f51b3b9b0bfeb1a802372a757526 | PHP | pveliberty/saferpay | /src/Payment/Saferpay/Data/RegistrationResponse.php | UTF-8 | 5,278 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Payment\Saferpay\Data;
class RegistrationResponse extends AbstractData implements RegistrationResponseWithDataInterface
{
/**
* @param string $msgtype
* @return $this
*/
public function setMsgtype($msgtype)
{
$this->set('MSGTYPE', $msgtype);
return $this;
... | true |
f743c3bc47dd05965196e13204c9fc9975bcaa63 | PHP | DNIB/104-project-cyan | /tests/Feature/TripTest.php | UTF-8 | 4,796 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use App\Models\TripLocations;
use App\Models\Trips;
use App\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class TripTest extends TestCase
{
use RefreshDatabase;
private $URL = "/trip";
/**
* ... | true |
59a835376d41988fec86e5df936ec12630e50cd7 | PHP | krivbass3D/myshop.local | /models/UsersModel.php | UTF-8 | 4,004 | 3.03125 | 3 | [] | no_license | <?php
/**
* Модель таблицы пользователей
*
*/
function registerNewUser ($email, $pwdMD5, $name, $phone, $adress)
{
include '../config/db.php'; // инициализация БД
$email = htmlspecialchars($mysqli->real_escape_string($email));
$name = htmlspecialchars($mysqli->real_escape_string($name));
$phone =... | true |
7a51c8ef000356a242c05b8c7cb207611ac9c353 | PHP | vulkjjc/Classified-Script | /server/app/Model/Follower.php | UTF-8 | 888 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use App\Model\Store;
use App\Model\User;
class Follower extends Model
{
const CREATED_AT = 'followed_at';
const UPDATED_AT = null;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'foll... | true |
fcec177168534adb052ae05adb3d12bd3c6e2551 | PHP | Holma23/projectSymfony4 | /projectSymfony4/src/Entity/Conge.php | UTF-8 | 2,210 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\CongeRepository")
*/
class Conge
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
... | true |
9c8d9df17e61c50d6c3e75ad3b04c25656f6d493 | PHP | paolord/typo3_tdd_demo | /typo3/sysext/install/Classes/Updates/WorkspacesNotificationSettingsUpdate.php | UTF-8 | 7,564 | 2.640625 | 3 | [
"MIT",
"GPL-2.0-only",
"CC-BY-2.5"
] | permissive | <?php
namespace TYPO3\CMS\Install\Updates;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license infor... | true |
73025e6ab40ab812efb7cddbb39e40cb07f4ed3d | PHP | Sambreezy/breezy_pastquestion_laravel | /app/Http/Middleware/VerifyRankToken.php | UTF-8 | 652 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
class VerifyRankToken
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next, $rank_token)
{
if (... | true |
166f0b2376e763cc09fc6c456bdd714327ba40e2 | PHP | richwandell/Hamden-Public-Figures | /src/lib/Controller.php | UTF-8 | 1,304 | 2.90625 | 3 | [] | no_license | <?php
namespace csc545\lib;
/**
* Class Controller
*
* Contains standard methods used on all pages in the app.
*
* @package csc545\lib
*/
class Controller
{
public function __construct()
{
$this->_debug = new Debug();
}
/**
* Test a csrf token,
* Requires the test token and t... | true |
c7d63acdad5822cd14bb47d0fe6ecb79acba3634 | PHP | sicaker/vermontlegislation.org | /app/Controller/UsersController.php | UTF-8 | 2,182 | 2.625 | 3 | [] | no_license | <?php // APP/Controller/UsersController.php:
class UsersController extends AppController
{
public $uses = array('Users');
public function opauth_complete()
{
//debug($this->data);
if($this->data['validated'] == true)
{
$this->opauth_success();
$this->set('success', true);
}
else
{
debug('va... | true |
3763df4efa3e7b708698de8993583ce18fd5440a | PHP | MinskSNV/utm5cabinet_5.3 | /library/Urfa/Auth/Adapter.php | UTF-8 | 1,495 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
class Urfa_Auth_Adapter implements Zend_Auth_Adapter_Interface
{
/**
* Username
*
* @var string
*/
protected $username = NULL;
/**
* Password
*
* @var string
*/
protected $password = NULL;
/**
* Class constructor
*
* The constructor sets... | true |
a4ab3c696289bb581a02f413596128299513f5f7 | PHP | jefsev/laravel-snippets | /limit_facebook_bot_request.php | UTF-8 | 983 | 2.5625 | 3 | [] | no_license | define( 'FACEBOOK_REQUEST_THROTTLE', 2.0 ); // Number of seconds permitted between each hit from facebookexternalhit
if( !empty( $_SERVER['HTTP_USER_AGENT'] ) && preg_match( '/^facebookexternalhit/', $_SERVER['HTTP_USER_AGENT'] ) ) {
$fbTmpFile = sys_get_temp_dir().'/facebookexternalhit.txt';
if( $fh = fopen( ... | true |
8d0657df05481026e39a54abbae1e18501a53e2f | PHP | IP-CAM/Opencart-to-Symfony-Bridge-Extension | /src/Repository/Account/gdpr.php | UTF-8 | 1,203 | 2.53125 | 3 | [] | no_license | <?php
namespace OpenCart\Catalog\Model\Account;
use OpenCart\System\Engine\Model;
class ModelAccountGdpr extends Model {
public function addGdpr($code, $email, $action) {
$this->db->query("INSERT INTO `" . DB_PREFIX . "gdpr` SET `store_id` = '" . $this->db->escape($this->config->get('config_store_id')) .... | true |
6662c65d629fc8d72f721c0021330875136e514e | PHP | KylePhillips1995/OPNBOX-PHP-mySQL- | /db_questionedit.php | UTF-8 | 27,309 | 2.515625 | 3 | [] | no_license | <?php
require 'db.php';
session_start();
$name = $_SESSION['name'];
$questionemail = $_SESSION['email'];
if ( isset($_POST['game1edit']) ) {
$_SESSION['gameid'] = 0;
$gameid = 0;
}
elseif ( isset($_POST['game2edit']) ) {
$_SESSION['g... | true |
5a75a6fb2f6f59c23163f30a4f25fa56c20a538c | PHP | Frankj1995/CMS-Blog- | /author_post.php | UTF-8 | 3,716 | 2.75 | 3 | [] | no_license | <?php ob_start(); ?>
<?php include "includes/db.php"; ?>
<?php include "includes/markup/header.php"; ?>
<?php include "includes/markup/nav.php"; ?>
<!-- Page Content -->
<div class="container">
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-8">
<!-- <h2>All Po... | true |
47d902075af21465da694184a330e0cc2147a19a | PHP | NicLarUniversidad/PAW_TP_Obligatorio | /src/clinical/database/models/UserModel.php | UTF-8 | 1,094 | 2.9375 | 3 | [] | no_license | <?php
namespace src\clinical\database\models;
class UserModel extends Model
{
public function __construct()
{
parent::__construct();
$this->setField("username", "");
$this->setField("password", "");
$this->setField("email", "");
$this->setField("nombre", "");
... | true |
a0776636a6a7d478cbb2f303bf7e5ee52a384030 | PHP | bill-c-martin/string-reverse | /tests/ReverseTest.php | UTF-8 | 1,003 | 3.046875 | 3 | [] | no_license | <?php
namespace Interview\Solutions\Strings\Reverse\Tests;
use Interview\Solutions\Strings\Reverse\Algorithms\ReverseAlgorithm;
use Interview\Solutions\Strings\Reverse\Exceptions\InvalidAlgorithmException;
use Interview\Solutions\Strings\Reverse\Reverse;
use PHPUnit\Framework\TestCase;
use UnexpectedValueException;
... | true |
ec6b71bea8cf854d496a0139ec1713a862c05f0b | PHP | spyder21er/senior-laravel-developer-assessment | /database/factories/UserFactory.php | UTF-8 | 1,839 | 2.65625 | 3 | [] | no_license | <?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Str;
use Illuminate\Support\Arr;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var s... | true |
5c52767e2a214287abee8f63b7195ee9d8ab4252 | PHP | maoshuoqiong/game | /_game/niuniu/bullfightingApi/lib/UploadStreamToFile.php | UTF-8 | 13,797 | 2.546875 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
// +----------------------------------------------... | true |
4f9069616ba142425c02b6a82185c5ebdac0a55f | PHP | davidDpruebas1/davidDpruebas1.github.io | /service/UsuariosServiceImp.class.php | UTF-8 | 2,224 | 3.078125 | 3 | [
"CC0-1.0"
] | permissive | <?php
require "../config/configdb.class.php";
require "../config/conexion.class.php";
require "IntUsuariosService.class.php";
class UsuariosServiceImp implements IntUsuariosService {
/* sobre-escribir los metodos abstractos*/
public function guardar($usuario){
//comprobar si llega el usuario
... | true |
3c216407007fbf05e6b4aa88ba50f71dbb062703 | PHP | AlkisStamos/metadata | /src/Metadata/ClassMetadata.php | UTF-8 | 2,098 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/*
* (c) Alkis Stamos <stamosalkis@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alks\Metadata\Metadata;
/**
* @package Metadata
* @author Alkis Stamos <stamosalkis@gmail.com>
* @license MIT
* @copyr... | true |
dea4d8748baa7aef466b814cf2cb0bdc8daa065a | PHP | LukeCarrier/exercism-solutions | /php/armstrong-numbers/armstrong-numbers.php | UTF-8 | 253 | 3.765625 | 4 | [] | no_license | <?php
function isArmstrongNumber(int $number): bool
{
$count = floor(log10($number)) + 1;
$sum = 0;
$work = $number;
while ($work > 0) {
$sum += ($work % 10) ** $count;
$work /= 10;
}
return $number == $sum;
}
| true |
a20eb3b4c93e9f05d0192946a7fd52f339fab59f | PHP | caugner/ttafs1 | /src/TerrainLeveling.php | UTF-8 | 3,384 | 3.4375 | 3 | [] | no_license | <?php
class TerrainLeveling {
use Counting;
/**
* Returns the minimum effort required to put the area into ground leveling.
*
* @param string[] Area of squares given as strings.
* @return int Minimum effort.
*/
public function getMinimum(array $area) : int {
$squares... | true |
05006c386a3e201f1adef9787c68d4b851f54272 | PHP | rahayutw/MonitoringSkripsi | /application/views/laporan/laporan.php | UTF-8 | 2,189 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | 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></title>
</head>
<body>
<form id="laporanDropd... | true |
c0d790d98e215bba4c39eb527430f826a7842289 | PHP | mchtylmz/examples | /mongo/app.php | UTF-8 | 893 | 2.875 | 3 | [] | no_license | <?php
use MongoDB\BSON\ObjectId;
use MongoDB\Driver\BulkWrite;
use MongoDB\Driver\Manager;
use MongoDB\Driver\Query;
if (!extension_loaded("MongoDB")) {
die("MongoDB yükle!");
}
$database = new Manager('mongodb://localhost:27017');
/*
// Toplu yazma işlemi (güncelleme, silme veya ekleme)
$write = new BulkWrite... | true |
ba16a5a8e5563c52fb889ed5daa503069302acb5 | PHP | lamminhthien-ntu/BaiTapPHP_TrenLop | /LAB_5/Bai3_TrenLop.php | UTF-8 | 6,567 | 2.796875 | 3 | [] | no_license | <?php
include ('../../BaiTapPHP_TrenLop/Thien_Lib/thien_framework.php');
class People {
private $hoTen;
private $diaChi;
private $gioiTinh;
/**
* @param $hoTen
* @param $diaChi
* @param $gioiTinh
*/
/**
* @return mixed
*/
public function getHoTen()
{
... | true |
0a9debe2ddf85c34123d4b0a007676a0eff0f19a | PHP | joesoeph/intalablog-codepolitan | /admin/posts/form.php | UTF-8 | 4,124 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Panggil session start
* session_start digunakan untuk memulai session pada halaman ini
* Karena kita hendak menggunakan global variabel $_SESSION, maka wajib menggunakannya
*/
session_start();
/*
* Include file connection.php dan helper.php
*/
include("../../connection.php");
include("../../helper.... | true |
1b3f2880932cb4f2857aa072591e0608ef6c2b7a | PHP | KuyaShawn/diner | /model/data-layer.php | UTF-8 | 3,351 | 3.296875 | 3 | [] | no_license | <?php
/* data-layer.php
* Return data for the diner app
*/
//Require the config file
require_once($_SERVER['DOCUMENT_ROOT'].'/../config.php');
class DataLayer
{
// Add a field for the database object
/**
* @var PDO The database connection object
*/
private $_dbh;
// Defi... | true |