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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f1fb50905b7d639522f9fbaf90ef0f0d8c2ce8f0 | PHP | neko384/Crowdfunding | /mission_6_yourcrowd.php | UTF-8 | 1,958 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>クラファンM@STER あなたのクラウドファンディング企画</title>
</head>
<body>
<?php
//MySQL内のデータベースへの接続(pdoの構築)
$dsn='mysql:dbname=データベース名; host=localhost';
$user='ユーザー名';
$password='パスワード';
$pdo=new PDO($dsn, $user, $password, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_W... | true |
b85b8ad5f1c4380fe141820ed7b1086d9be48d60 | PHP | domuserk/Exercices-PHP | /exercices/05-banco-de-dados-com-pdo/source/Database/Connect.php | UTF-8 | 1,085 | 3.0625 | 3 | [] | no_license | <?php
namespace Source\Database;
use \PDO;
use \PDOException;
class Connect
{
private const HOST="localhost";
private const USER="root";
private const DBNAME="phpfullstack";
private const PASSWD="";
private const OPTIONS=[
PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8",
PDO::ATTR_ERRMODE=>PDO::E... | true |
96238100cc713e8ef9ee8aadbe098a2e36da0b3e | PHP | CiocX/Testington | /sqql.php | UTF-8 | 725 | 2.703125 | 3 | [] | no_license | <html>
<body>
<?php
$servername = "localhost";
$username = "XCioc";
$password = "aurash45";
$dbname = "XCioc";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT Nume,Prenume,Elev.CNP,Medi... | true |
46e250adf7357f784c62c6e63ead766175323113 | PHP | GandalfSC2/GandalfSC2 | /src/Controller/SearchController.php | UTF-8 | 1,126 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Repository\TvShowRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/search", name="search_")
... | true |
56c5c7549da08c4fb6820bf89b550342f87ad409 | PHP | adriandavid/redsocial-progweb-ucp | /RedSocial/Datos/UsuarioDatos.php | UTF-8 | 2,609 | 3.0625 | 3 | [] | no_license | <?php
require './Datos/conexion.php';
require './Entidades/Usuario.php';
class UsuarioDatos {
public function obtenerUsuarios($usuarioId){
$conec= new conexion();
$consulta=$conec->prepare('SELECT usuarioId, nombreUsuario, nombre, apellido '
. ' FROM usuari... | true |
782cca54a8e1e7a79c8df727a5474bb146170e4a | PHP | Ferreiramg/Repo-teste | /ServiceLayer/Model/PDOConn.php | UTF-8 | 3,582 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Model;
use PDO;
/**
* Description of PDOConn
*
* @author Luis Paulo
*/
class PDOConn extends PDO {
public function __construct($dsn, $username = null, $password = null, $driver_options = array()) {
parent::__construct($dsn, $username, $password, $driver_options);
... | true |
88cc2e43345efa106a81551e62c98476aba53dcf | PHP | experteam-mx/api-base-bundle | /src/Security/User.php | UTF-8 | 4,933 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Experteam\ApiBaseBundle\Security;
use Symfony\Component\Security\Core\User\UserInterface;
class User implements UserInterface
{
private $id;
private $name;
private $username;
private $created_at;
private $updated_at;
private $token;
private $appkey;
private $rol... | true |
20c7607c28a0402b18959e98de3a094fdd305273 | PHP | ChiChuuuuu/userqld | /app/Exports/Grade2Export.php | UTF-8 | 1,149 | 2.625 | 3 | [] | no_license | <?php
namespace App\Exports;
use App\Models\Grade2Model;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
class Grade2Export implements FromCollection, WithHeadings
{
/**
* @return \Illuminate\Support\Collection
*/
... | true |
e59982d28d199fcfd6bdc3ed887abc0df0622fe4 | PHP | itscoconet/UserManagementSystem | /login.php | UTF-8 | 1,758 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
include_once("include/session.php"); // Session.PHP
/*** LOGIN.PHP
* This is an example of the log in page of a website. Here users will be able to login. However, like on most sites the login form doesn't just have to be on the main page, but re-appear on subsequent pages, depending on whether the user has lo... | true |
fd0d57658ba394f57ce8386a0f31c97b0b72a06a | PHP | davidxuuts/yii2-base | /src/enums/UploadTypeEnum.php | UTF-8 | 926 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) 2023.
* @author David Xu <david.xu.uts@163.com>
* All rights reserved.
*/
namespace davidxu\base\enums;
use Yii;
/**
* UploadType Enum
*
* Class UploadTypeEnum
* @package davidxu\base\enums
* @author David Xu <david.xu.uts@163.com>
*/
class UploadTypeEnum extends BaseEnum
{
publ... | true |
437fbf549a8a2d4e48e90f03dde8eb7941f48964 | PHP | BendrissM/MedPlatform | /app/Http/Controllers/MedecinController.php | UTF-8 | 2,695 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Medecin;
use App\User;
use Illuminate\Support\Facades\Hash;
class MedecinController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
... | true |
a8de774c4c202b7fdfd84b256fb857454ee975bf | PHP | m4nt4s/galerija | /app/controllers/UsersController.php | UTF-8 | 6,052 | 2.78125 | 3 | [] | no_license | <?php
class UsersController extends \BaseController {
public function showLogin()
{
//show the form
if (Auth::check())
{
return Redirect::route('account');
}
// Show the page
return View::make('account.log');
}
/**
* Display a listing ... | true |
cc3fbdee22c578f3c6f4394fd39f891b502ed11a | PHP | gielfeldt/fas-autowire | /tests/TestImplementation.php | UTF-8 | 807 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Fas\Autowire\Tests;
class TestImplementation implements TestInterface
{
public static $counter = 0;
private $id;
public function __construct($id = 'default')
{
self::$counter++;
$this->id = $id;
}
public function id()
{
return $this->id;
}
... | true |
579be62f3128aad7b815d4dbe4e3bc2c50d3d390 | PHP | FFormula/Strategy | /src/Strategy/OperationInterface.php | UTF-8 | 212 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: fform
* Date: 09.08.2018
* Time: 20:41
*/
namespace Volosatov\Strategy;
interface OperationInterface
{
public function calc(int $a, int $b): int;
} | true |
9b9e93b1b219a409c722c1b38a8a0ad9e8a90306 | PHP | roubin94/ifb299group89 | /_portfolios/Daniel Wan/R1 - Sign Up Form/signup_mysql.php | UTF-8 | 2,547 | 2.921875 | 3 | [] | no_license | <?php
// Connect to the students database
include "db_connect_students.php";
// Ensure inputted variables are mySQL friendly.
$email = mysqli_real_escape_string($db_students, $email);
$password = mysqli_real_escape_string($db_students, $password);
$password = password_hash($password, PASSW... | true |
50d09773991184f1bb9b6083ba4f24a7c1237ebc | PHP | lucyferhehe/agrilinkproject | /common/models/Havest.php | UTF-8 | 1,631 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "havest".
*
* @property integer $havest_ID
* @property integer $FuID
* @property integer $UserID
* @property double $khoiluong_thuhoach
* @property integer $Ngayvanchuyen
* @property integer $hinhthucvanchuyen
* @property string... | true |
16d08da4f42f0c2dc528a16761d950357505fcb6 | PHP | andregr15/GerenciadorProjeto | /app/Services/ProjectNoteService.php | UTF-8 | 2,897 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Desenvolvimento
* Date: 12/09/2017
* Time: 14:53
*/
namespace CodeProject\Services;
use CodeProject\Repositories\Cadastros\ProjectnoteRepository;
use CodeProject\Validators\ProjectNoteValidator;
use Prettus\Validator\Exceptions\ValidatorException;
class ProjectNoteServi... | true |
6fcde5db38305dce4d9425a5067b3ccfc4bcd166 | PHP | marcofarnezi/supermetrics | /src/Services/Post/PostsCalculator.php | UTF-8 | 1,094 | 3.078125 | 3 | [] | no_license | <?php
namespace App\Services\Post;
use App\Models\Interfaces\ModelInterface;
use App\Models\Post;
use App\Services\Interfaces\CalculatorInterface;
use App\Services\Interfaces\RuleInterface;
class PostsCalculator implements CalculatorInterface
{
protected $rules;
public function __construct()
{
$t... | true |
dd54df691a200c06b0b588ce15a546f9453e8ebc | PHP | yanaFramework/yanaFramework | /trunk/libs/yana/plugins/annotations/reflectionclass.php | UTF-8 | 6,550 | 2.609375 | 3 | [] | no_license | <?php
/**
* YANA library
*
* Software: Yana PHP-Framework
* Version: {VERSION} - {DATE}
* License: GNU GPL http://www.gnu.org/licenses/
*
* This program: can be redistributed and/or modified under the
* terms of the GNU General Public License as published by the
* Free Software Foundation, either version... | true |
895e2af1d0ae52ba124799f4edca922c9f683cf5 | PHP | tweetledee/tweetledee | /tweetledee/tldlib/tldCache.php | UTF-8 | 6,106 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/**
* tldCache
*
* A cache for Tweetledee written in PHP.
*
* @author levymetal / Christian Varga
* @version 0.1
* Apache License
*
* 21 Feb 2014
*/
class tldCache
{
var $tmhOAuth;
var $interval = 90; // 90 seconds
/**
* Creates a new tldCache object
*
* @param array $keys, t... | true |
02b8702369c0ffca6f9990a45812e194305d2b3f | PHP | yehaicao/license | /app/Controller/WidgetsController.php | UTF-8 | 3,522 | 2.578125 | 3 | [] | no_license | <?php
/**
* Widgets Controller
*
* PHP version 5
*
* @author tomato <wangshijun2010@gmail.com>
* @copyright (c) 2011 tomato <wangshijun2010@gmail.com>
* @package Blog
* @subpackage Widgets
* @todo Rename this module to ArticleWidget
* @todo Implement Drag and Drop for widget organize and resize
... | true |
4cfe92254d3989c2ac40d834a33e2aa37521e8e5 | PHP | danimoncerro/CursPHP | /TemePHP/Tema23/tema_index1.php | UTF-8 | 766 | 2.890625 | 3 | [] | no_license | <?php
include 'connect.php';
// construim sql
$sql = "SELECT localitate.*, judet.name AS judet_name
FROM localitate
LEFT JOIN judet ON judet.id = localitate.id_judet";
// pregatim sql
$stmt = $conn->prepare($sql);
// executam sql
$stmt->execute();
// afisam rezultatele intr-un tabel
$result = ... | true |
6bc20c673d762c04a62daba6080710c4fd52e48e | PHP | Milos114/Exercise | /Patterns/Singleton.php | UTF-8 | 463 | 3.203125 | 3 | [] | no_license | <?php
class Singleton
{
/**
* @var Singleton The reference to *Singleton* instance of this class
*/
private static $instance;
/**
* Returns the *Singleton* instance of this class.
*
* @return Singleton The *Singleton* instance.
*/
public static function getInstance()
... | true |
d03fae2b3088d3cc20c7a5a103fc39c8d8f071bf | PHP | DroidPulkit/phpEcommerce | /cart.php | UTF-8 | 12,342 | 2.515625 | 3 | [] | no_license | <!--Changing the Header of the page -->
<?php $PageTitle = "Amazing Mart - Cart"; ?>
<?php
//This is to remove the spinner in the input number
function customPageHeader() { ?>
<style>
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button
{
-webkit-appearan... | true |
2449827c392be76f9226fe0468bea3756c88ec8d | PHP | denshade/register | /src/addcolumnret.php | UTF-8 | 945 | 2.8125 | 3 | [] | no_license | <?php
require_once "daos/ConceptDao.php";
require_once "daos/AuditTrail.php";
require_once "../settings.php";
require "connection.php";
$pdo = getConnectionFromSession();
$concept = $_GET["concept"];
$columnname = $_GET["name"];
$columntype = $_GET["type"];
if ($columntype == "enum")
{
$options = $_GET["option... | true |
2d8444b1501f045c09a8c5a3dc94f62db76a081d | PHP | kerbeh/valence-wrapper | /src/Model/LearningRepositoryObjects/LRWSSearchResultCollection.php | UTF-8 | 960 | 2.59375 | 3 | [] | no_license | <?php
namespace ValenceWrapper\Model\LRWSSearchResultCollection;
use ValenceWrapper\Model\BaseValenceModel;
use ValenceWrapper\Model\Basic\UtcDateTime;
use ValenceWrapper\Model\Basic\RichText;
/**
* @see https://docs.valence.desire2learn.com#Repository.LRWSSearchResultCollection
*/
class LRWSSearchResultCollection
... | true |
d3542e6069ae2c586b8ae4a7bdae7fd11740d60e | PHP | botman/driver-facebook | /tests/Extensions/ElementTest.php | UTF-8 | 2,672 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Extensions;
use BotMan\Drivers\Facebook\Extensions\Element;
use BotMan\Drivers\Facebook\Extensions\ElementButton;
use Illuminate\Support\Arr;
use PHPUnit_Framework_TestCase;
class ElementTest extends PHPUnit_Framework_TestCase
{
/** @test */
public function it_can_be_created()
{
... | true |
49ffe71ce18ab2aaf58f514002a303553985e719 | PHP | andyfusniak/villasforrent-zend-framework | /application/modules/common/models/DbTable/PropertyTypes.php | UTF-8 | 861 | 2.515625 | 3 | [] | no_license | <?php
class Common_Model_DbTable_PropertyTypes extends Zend_Db_Table_Abstract
{
protected $_name = 'property_types';
protected $_primary = 'idPropertyType';
public function getPropertyTypesInUseLookup()
{
// Build this query:
// SELECT *
// FROM propertyTypes
// ... | true |
d8232c2dc67e2f1b53bcb01e989392450f67b021 | PHP | dargue3/rookiecard | /tests/php/unit/stat/HandlesStatLogicTest.php | UTF-8 | 5,434 | 2.640625 | 3 | [] | no_license | <?php
use App\Event;
use App\Team;
use App\Stat;
use App\TeamMember;
use App\Events\TeamPostedStats;
use App\RC\Stat\HandlesStatLogic;
class HandlesStatLogicTest extends TestCase
{
protected $event;
protected $team;
protected $data;
public function setUp()
{
parent::setUp();
$this->getRawStats();
... | true |
1046c4b82b5baca2c5e7e06ddbb0e2f19fa02539 | PHP | CheckmateJ/SiteMonitor | /src/SiteTestEngine/KeywordSiteTest.php | UTF-8 | 782 | 2.640625 | 3 | [] | no_license | <?php
namespace App\SiteTestEngine;
use App\Entity\SiteTest;
use App\Entity\SiteTestResults;
use Psr\Http\Message\ResponseInterface;
class KeywordSiteTest implements SiteTestInterface
{
public function run(SiteTest $siteTest, ResponseInterface $response): SiteTestResults
{
$siteTestResults = new S... | true |
a35faa9ab34cc74442e3c7dba5e74ba76d3776be | PHP | elgav04/web_design_II | /DatosArea.html/conexion.php | UTF-8 | 366 | 2.921875 | 3 | [] | no_license | <?php
/*Establecer la variable que nos permitirá la conexión*/
$conec = new mysqli("localhost","root","","institutofares");
/*Condicional que nos permitirá saber si existe un error dentro de la conexión a MySQL*/
if($conec->connect_errno){
echo "fallo en la conexión de MySQL: (".$conec->connect_... | true |
12ee2283dd24996892d6a9235ba7ea6af3b5ca6b | PHP | hiratoshi/kadai02 | /kadai/gsdb_kadai_insert.php | UTF-8 | 2,116 | 2.96875 | 3 | [] | no_license | <?php
//1. POSTデータ取得
$school_num = $_POST["school_num"];
$name= $_POST["name"];
$nickname = $_POST["nickname"];
$age = $_POST["age"];
$about_work = $_POST["about_work"];
$info = $_POST["info"];
$presen = $_POST["presen"];
//2. DB接続します
try {
$pdo = new PDO('mysql:dbname=gs_db37;charset=utf8;host=localhost... | true |
55a3ebf07533fbb3b179dd8789d91635d904e995 | PHP | groupcash/socialhours | /src/app/AddressRenderer.php | UTF-8 | 1,810 | 2.828125 | 3 | [] | no_license | <?php
namespace groupcash\socialhours\app;
use groupcash\php\model\signing\Binary;
use groupcash\socialhours\projections\AccountList;
use groupcash\socialhours\projections\OrganisationList;
use rtens\domin\delivery\web\Element;
use rtens\domin\delivery\web\WebRenderer;
class AddressRenderer implements WebRenderer {
... | true |
e722b19f38220d3192fd3d57dc6e99cba81d81ef | PHP | matheusemidio/SalesWebsite_Semester4 | /objects/customer.php | UTF-8 | 20,064 | 3.25 | 3 | [] | no_license | <?php
#Revision History
#Matheus Emidio (1931358) 2021-04-24 Created customer class
#Matheus Emidio (1931358) 2021-04-30 Fixed problem with setters and constructor, created load and save functions
# 2021-04-30 Fixed probelm with parameters in queries
# ... | true |
c56cc0954f9e7e245711d84f1ab790c45e8c5162 | PHP | rockbuzz/lara-rbac | /src/Traits/HasPermission.php | UTF-8 | 3,839 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Rockbuzz\LaraRbac\Traits;
use Rockbuzz\LaraRbac\Models\Permission;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\{Model, ModelNotFoundException};
trait HasPermission
{
/**
* @inheritdoc
*/
public function permiss... | true |
298fbca7a90a215d46663b89c56e2c9e19042b1b | PHP | qianjilou/mycourses | /php/源代码/DAY36-smarty模板引擎/11.smarty_book.php | UTF-8 | 1,070 | 2.6875 | 3 | [] | no_license | <?php
date_default_timezone_set('PRC');
//接收url地址栏中的参数书的id
$id = isset($_GET['id'])?$_GET['id']:1;
//加载smarty的核心类文件
require_once 'smarty/Smarty.class.php';
$smarty = new Smarty();
//先判断是否存在缓存文件
if(!$smarty->isCached('11.book.html',$id)){
//从数据库查询商品的信息
require_once 'DAOPDO.class.php';
$option = array(
... | true |
5ef4b1700294caf451b8a0226039deb617f01eb9 | PHP | guoyu07/uc-1 | /ucframework/View.php | UTF-8 | 811 | 2.546875 | 3 | [] | no_license | <?php
namespace ucframework;
use ucframework\lib\Config;
class View
{
public function fetch($template='', $assign)
{
extract($assign, EXTR_SKIP);
ob_start();
include $this->getTemplatePath($template);
$contents = ob_get_contents();
ob_end_clean();
echo $conten... | true |
67218c8c5366c9f8960f9cd8396d84e0c3d61f51 | PHP | psger/lab_204 | /app/Post.php | UTF-8 | 1,382 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
class Post extends Model
{
//
use Notifiable;
protected $fillable = [
'id','title','content','user_id','cat_id','view_count','vote_count','like','status','created_at','update_a... | true |
ae17eb7b837549d2bcacc290890078bf9eca4128 | PHP | sta-ka/startschuss | /app/Http/Controllers/Admin/RegionsController.php | UTF-8 | 1,385 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Misc\Region\RegionRepository as Regions;
use App\Http\Requests\Region\UpdateDataRequest;
/**
* Class RegionsController
*
* @package App\Http\Controllers\Admin
*/
class RegionsController extends Controller {
/**
... | true |
86887c253d9b4b13536d8d084038520d3b299853 | PHP | Rsmj99/Solve | /coEjercicio04.php | UTF-8 | 3,014 | 3 | 3 | [] | no_license | <?php
include 'header.php';
include 'hdCondicional.php';
?>
<section class="ejercicio">
<h1>EJERCICIO 04</h1>
<hr>
<br>
<p>
Elabore un programa que solicite el nombre y la edad de 2 hermanos. Realice la
comparación de las edades y muestre un mensaje indicando el nombre del
... | true |
1b12ddf9c2759815d22214ec91258ff8fa6fa8f8 | PHP | Githubxinwei/saas | /common/models/relations/ExtensionRecordRelations.php | UTF-8 | 891 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\relations;
use common\models\Admin;
use common\models\base\MemberCourseOrder;
use common\models\Employee;
trait ExtensionRecordRelations
{
/**
* 后台 - 会员管理 - 关联会员课程订单表
* @return string
* @author 黄华
* @create 2017-10-13
* @param
*/
publi... | true |
a1b41e4dbd821562e20062133f97427a6a952719 | PHP | ebrudikmen/textile-project-laravel | /app/Models/Product.php | UTF-8 | 741 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use Eloquent;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
/**
* Class Product
* @mixin Eloquent
*
* @property int id
* @property string name
* @property Carbon created_at
* @property Carbon updated_at
* @prop... | true |
4925a991f6292a15527ebf9eee7f19ff444d32e1 | PHP | footstep9612/Hallz | /common/library/Erui/Common/SSOClient.php | UTF-8 | 2,776 | 2.796875 | 3 | [] | no_license | <?php
namespace Erui\Common;
/**
* SSO客户端
* SSO客户端验证工具,
* @author: zhengkq
**/
class SSOClient{
/**
* SSO服务器验证地址
**/
private $sso_server = "";
/**
* Token 名称
**/
const TOKENT_NAME = 'eruitoken';
/**
* SSO Token
**/
private $sso_token = "";
/*
* 当前登录账号信息
... | true |
1afb74eab9b7b24dae5c2dae2bd96a9b8ee5b31d | PHP | Demschwarz/web | /task_3/3/PHP/index.php | UTF-8 | 3,676 | 3.125 | 3 | [] | no_license | <?php
/**
* Интернет-программирование. Задача 8.
* Реализовать скрипт на веб-сервере на PHP или другом языке,
* сохраняющий в XML-файл заполненную форму задания 7. При
* отправке формы на сервере создается новый файл с уникальным именем.
*/
// Отправляем браузеру правильную кодировку,
// файл index.php д... | true |
2a836c702be5e2b29b4b58c91da5f1553f402095 | PHP | vinayakz/dads | /text_on_image.php | UTF-8 | 1,119 | 3.03125 | 3 | [] | no_license | <?php
error_reporting(0);
//include this php file
require('fpdf/fpdf.php');
// Output Image
header('Content-type: image/jpeg');
// Provide Image Path
$img = imagecreatefromjpeg('image.jpg');
// Text Color Of the Image
$white = imagecolorallocate($img, 255, 255, 255);
// Text ... | true |
e461374396f24070757e8d86a0f2aef934b107cd | PHP | P79N6A/jcaitest | /system/modules/minicard/models/spread/MiniCardSpreadApply.php | UTF-8 | 1,170 | 2.609375 | 3 | [] | no_license | <?php
/**
* @link http://api.ibos.cn/
* @copyright Copyright (c) 2017 IBOS Inc
*/
namespace app\modules\minicard\models\spread;
use app\core\components\Model;
class MiniCardSpreadApply extends Model
{
// 申请状态,0为待审核,1为通过,2为拒绝
const STATUS_PENDING = 0;
const STATUS_SUCCESS = 1;
const STATUS_FAIL = 2... | true |
db9f56c9738d0e8dfabe3d9e268c6c00789cf9b2 | PHP | armnugraha/PRE-UJIKOM-JWD | /soal2_Arman_Nugraha/views/home/edit.php | UTF-8 | 1,917 | 2.59375 | 3 | [] | no_license | <?php
include('connection/connection.php');
$id = $_GET['get_id'];
$show = mysqli_query($koneksi, "SELECT * FROM siswa WHERE id='$id'");
if(mysqli_num_rows($show) == 0){
//jika tidak ada data yg sesuai maka akan langsung di arahkan ke halaman depan atau beranda -> index.php
ec... | true |
48222f393825bb6986bc236f7febd520ab90cea2 | PHP | onenewera/evergreen-escapes | /app/public/wp-content/plugins/forminator/library/calculator/symbol/functions/class-function-avg.php | UTF-8 | 725 | 3.234375 | 3 | [
"GPL-2.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-or-later"
] | permissive | <?php
/**
* PHP array_sum() / count()
* Example: "avg(2,3,4)" => 3, "abs(3,7,4)" => 5
*
* @see http://php.net/manual/en/function.array-sum.php
* @see http://php.net/manual/en/function.count.php
*/
class Forminator_Calculator_Symbol_Function_Avg extends Forminator_Calculator_Symbol_Function_Abstract {
/**
* @... | true |
57ebd7018ea5f1b8659bc285facad5ad693e8761 | PHP | rakeshraju997/scheduler | /lib/helpers/work_periods_helper.php | UTF-8 | 23,733 | 2.609375 | 3 | [] | no_license | <?php
class OsWorkPeriodsHelper {
public static $existing_work_periods;
// args: period_id, week_day, is_active, start_time, end_time, custom_date, agent_id, service_id
public static function generate_work_period_form($args = array(), $allow_remove = true){
$default_args = array(
'period_id' => false... | true |
a8ea65938b094e765ebced919dd62659d457546e | PHP | mo3golom/wonder-stories | /src/Enum/BlockTypes.php | UTF-8 | 637 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Mo3golom\WonderStories\Enum;
use Mo3golom\WonderStories\Helper\KernelHelper;
class BlockTypes
{
public const TYPE_TEXT = 'text';
public const TYPE_TIMER = 'timer';
private array $config;
/**
* BlockTypes constructor.
*
* @param array|null $c... | true |
ed0a8a195b7cad562eb119c69964b57bc287c057 | PHP | Yunys26/Test_EV | /model/sql_query/look_table.php | UTF-8 | 1,646 | 2.734375 | 3 | [] | no_license | <?php
// Соединение с бд
include("connection.php");
// Выбор таблицы send_user
mysqli_select_db($my_connect, "send_user");
// Запрос в таблицу send_user
$result = mysqli_query( $my_connect, "SELECT * FROM users");
// Вывод данных
echo "<table border='1'>
<tr>
<td align=center> <b>id</b></td>
<td align=cente... | true |
dd8165b7c6a97f8f9c0e99e5f06f8378cd7e7b1b | PHP | Denys-Kruhliak/PHP-test | /src/Models/ActiveRecord.php | UTF-8 | 2,474 | 2.84375 | 3 | [] | no_license | <?php
namespace Models;
use \Services\Db;
abstract class ActiveRecord{
public static function all(){
$db = Db::getInstance();
return $db->query('SELECT * FROM '.static::getTableName(),[],static::class);
}
public static function getByID($id){
$db = Db::getInstance();
$result =... | true |
0ae93b8281aa47d242777a4f9957e0f802b28407 | PHP | maury91/NiiCMS | /admin/_proto/trash.php | UTF-8 | 2,651 | 2.515625 | 3 | [] | no_license | <?php
/*
Funzioni Cestino
Ultima modifica : 22/08/12 (v0.6)
*/
include_once('_proto/func.php');
function trash_pages() {
$pages = array();
foreach (list_files('.trash/pages','php') as $v) {
$fn = str_replace('.php','',$v);
if (fext($fn) != 'last')
$pages[] = $fn;
}
$pages_mob = array();
foreach (list_fi... | true |
f213deb007c8c52f1d9905ed246ded75f3773612 | PHP | ahmed-hamdy90/build_web_app_using_Zend_2 | /module/Album/src/Album/Model/AlbumTable.php | UTF-8 | 2,384 | 3.046875 | 3 | [] | no_license | <?php
namespace Album\Model;
use Zend\Db\ResultSet\ResultSet;
use Zend\Db\TableGateway\TableGateway;
/**
* Album Table
* @package Album\Model
* @author Ahmed Hamdy <ahmedhamdy20@gmail.com>
*/
class AlbumTable
{
protected $tableGateway;
/**
* Album Table Constructor
* @param TableGateway $ta... | true |
3c901e70f603d286c09c2e6b27dfb9a43d0cbf66 | PHP | appcia/webwork | /lib/Appcia/Webwork/Resource/Resource.php | UTF-8 | 3,928 | 2.921875 | 3 | [] | no_license | <?
namespace Appcia\Webwork\Resource;
use Appcia\Webwork\System\File;
/**
* General file / URL representation for images, videos, anything...
*/
class Resource extends Type
{
/**
* Manager
*
* @var Manager
*/
protected $manager;
/**
* Sub types
*
* @var Type[]
*/... | true |
f31778e940f12056614bfaaaf2c91bbb83f3af8d | PHP | hirokawa/mammoth5c | /part1/chap1/page1.php | UTF-8 | 586 | 2.90625 | 3 | [] | no_license | <html><body>
<form action="">
名前:<input type="text" name="name">
パスワード:<input type="password" name="password">
<input type="submit"></form><hr />
<?php
if (isset($_GET['name']) && isset($_GET['password'])) {
$db = new PDO("mysql:host=localhost;dbname=testdb;charset=utf8",
"dbuser", "sec... | true |
69d7e677f76fb2fe4b5cf867c70b546d164988d9 | PHP | afstanislav/git | /src/ApiGameBundle/Utils/DeveloperLevelStrategy/RandomStrategyDeveloperLevel.php | UTF-8 | 524 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace ApiGameBundle\Utils\DeveloperLevelStrategy;
/**
* Class RandomStrategyDeveloperLevel
*/
class RandomStrategyDeveloperLevel implements DeveloperLevelStrategyInterface
{
/**
* Minimum random level
*/
const MIN_LEVEL = 10;
/**
* Maximum random level
*/
const MAX_LEV... | true |
79e8b68e0499ecd4e565285665b0cf4276473817 | PHP | emaxprog/payment-microservices | /payment-system/components/payment/models/repositories/TeamRepository.php | UTF-8 | 2,128 | 2.640625 | 3 | [] | no_license | <?php
/**
* Файл класса UserTimeRecordsRepository
*
* @copyright Copyright (c) 2018, Oleg Chulakov Studio
* @link http://chulakov.com/
*/
namespace common\components\payment\models\repositories;
use Yii;
use yii\di\Instance;
use common\components\payment\PaymentSystem;
use chulakov\components\exceptions\NotFound... | true |
88ab5d76845a42a26201093de047a299207ca03c | PHP | anton-kuznetsov/emporium-babysuit | /includes/category_info/CategoryInfo_DALC.php | UTF-8 | 682 | 2.578125 | 3 | [] | no_license | <?php
class CategoryInfo_DALC extends DALC {
protected $folder_class = '';
//--------------------------------------------------------------------------
// Конструктор
function __construct() {
global $folder_root;
parent::__construct();
$this->folder_class = $folder_root . '/includes/cate... | true |
15783776c9e8e6339925231d147422674577f115 | PHP | Christiann17/Site-resto | /site resto/controleur/rechercheResto.php | UTF-8 | 1,393 | 2.515625 | 3 | [] | no_license | <?php
if ($_SERVER["SCRIPT_FILENAME"] == __FILE__) {
$racine = "..";
}
include_once "$racine/modele/bd.resto.inc.php";
// création du menu burger
$menuBurger = array();
$menuBurger[] = Array("url" => "./?action=recherche&critere=nom", "label" => "Recherche par nom");
$menuBurger[] = Array("url" => "./?ac... | true |
053207d368e634def083011bd19a90b2dc564d15 | PHP | zero-gravity-cms/zero-gravity-cms | /src/Content/Finder/Iterator/VisibleFilterIterator.php | UTF-8 | 812 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace ZeroGravity\Cms\Content\Finder\Iterator;
use FilterIterator;
use Iterator;
use ZeroGravity\Cms\Content\Page;
/**
* VisibleFilterIterator filters out pages that do not match the required visible state.
*
* @method Page current()
*/
final class VisibleFilterIterator extends FilterIterator
{
pri... | true |
59db7a001340cd270e14b338e6009e64186332b7 | PHP | gilsonmello/aprendanaweb | /app/Services/Lesson/Traits/LessonAttributes.php | UTF-8 | 2,211 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Services\Lesson\Traits;
use Carbon\Carbon;
/**
* Class LessonAttributes
* @package App\Services\Lesson\Traits
*/
trait LessonAttributes {
public function getVideoAdUrlAttribute($video_ad_url) {
if (starts_with($video_ad_url, 'http://')) {
return 'https://' . substr($vi... | true |
b24468d1e0a8fad418b9040f3c648be95de6f992 | PHP | chaffariinfo/pythonex | /index.php | UTF-8 | 352 | 2.625 | 3 | [] | no_license | <html>
<head>
<title>Myshop</title>
</head>
<body>
<h1>Welcome to myshop</h1>
<ul>
<?php
$json= file_get_contents('http://product-service');
$obj=json_decode($json);
$products=$obj->products;
foreach($products as $product){
echo("<li>$product</li>");
}
?... | true |
7a557a4f3b5593c28857b2c7631735cb4581e7b1 | PHP | cosnics/cosnics | /src/Chamilo/Core/Repository/ContentObject/Portfolio/Display/Preview/DummyNotification.php | UTF-8 | 1,842 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Core\Repository\ContentObject\Portfolio\Display\Preview;
use Chamilo\Core\Repository\ContentObject\Portfolio\Storage\DataClass\Notification;
use Chamilo\Libraries\Utilities\UUID;
/**
* A dummy Notification class which allows the preview to emulate the Notification functionality
*
* @packag... | true |
b3497ab4f18099ea429a3a7173ebcc3e04f25f1e | PHP | isaqib23/Focus-Academy | /database/migrations/2020_11_29_160309_create_video_uploaders_table.php | UTF-8 | 622 | 2.65625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Class CreateVideoUploadersTable.
*/
class CreateVideoUploadersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('video_uploaders', function(Blu... | true |
90bdeb9611ecbaf702cd33e7242c506a47f0aaee | PHP | JoffreyC22/algobreizh | /managers/FamillesManager.php | UTF-8 | 2,112 | 3.046875 | 3 | [] | no_license | <?php
class FamillesManager {
public static function getAllFamilles(){
$pdo = Database::getInstance()->query('SELECT * FROM familles');
while($datas = $pdo->fetch(PDO::FETCH_ASSOC)){
$familles[] = new Familles($datas);
}
return (isset($familles)) ? $familles : null ;
... | true |
5ab4e85364abef85e24ca80ae081f3c7e8121226 | PHP | William-Guevara/zinobe | /controller/CustomerData.php | UTF-8 | 3,269 | 2.671875 | 3 | [] | no_license | <?php
require_once('database.php');
class CustomerData
{
private $conexion;
#el sql de la última consulta
public $sql;
#el resultado de la última consulta
private $resultado;
private $consulta;
#el último registro del último resultado
private $registro;
//private $resultado;
public function __construct... | true |
4096b741df6622e4d5e7a42de8f5f24561219425 | PHP | petro1/users | /src/ListBundle/Controller/ListController.php | UTF-8 | 2,997 | 2.53125 | 3 | [] | no_license | <?php
namespace ListBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use ListBundle\Criteria\UsersCriteria;
use ListBundle\Entities\User;
class ListController extends Controller
{
/*
* Home page
* @param Request
* @param Str... | true |
9acba53a630dc70823a85fdfea0b1a3cb2c13da8 | PHP | tounaf/sf-api-platform-react-admin | /src/Command/ProfileGenerateCommand.php | UTF-8 | 2,073 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Command;
use App\Entity\Profile;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Con... | true |
37115c841933ea5176a0a95a086a67f77dd4cb3e | PHP | patilstar/HMVC-WITH-CI | /platform/applications/site/modules/playground/views/smileys.php | UTF-8 | 2,259 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* @author Deepak Patil <deepak.patil@relesol.com>, 2015
* @license The MIT License, http://opensource.org/licenses/MIT
*/
// It is not to be placed here, I know.
function _force_htmlentities($string) {
$arr = preg_split('/(?<!^)(?!$)/u'... | true |
2f1d34444be93a3756e3a72375039c881d521e8b | PHP | joseph-benoy/telegram-bot-sdk | /classes/command.class.php | UTF-8 | 5,425 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Telegram\Api;
abstract class Command extends Action{
protected $updateObj;
protected $apiToken;
public function __construct($apiToken,$updateObj){
$this->updateObj = $updateObj;
$this->apiToken = $apiToken;
}
abstract public functio... | true |
a1f205c7395b37a318d5fa7c1812982261a7ddec | PHP | syntaxerro/ymock | /src/Utils/MocksCollection.php | UTF-8 | 3,267 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace SyntaxErro\YMock\Utils;
use SyntaxErro\YMock\Exception\InaccessibleCollectionElementException;
class MocksCollection implements \Iterator
{
/**
* @var array
*/
private $mocks = [];
/**
* @var int
*/
private $index = 0;
/**
* MocksCollection constructor.
... | true |
a7a375f1914471e6f6d9070dbcb6ce40ec0b4072 | PHP | pashabiskvit/itprojectstest | /class/db.php | UTF-8 | 785 | 3.015625 | 3 | [] | no_license | <?php
class db
{
private $dbHost;
private $db_name;
private $user_name;
private $user_password;
public function __construct($dbHost, $dbName, $userName, $userPassword) {
$this->dbHost = $dbHost;
$this->dbName = $dbName;
$this->userName = $userName;
$this->userPassw... | true |
41af1d9ea28352ae543952a840866907cc049477 | PHP | davesuy/cm-calculate-functionality | /includes/class-enqueue-scripts.php | UTF-8 | 724 | 2.53125 | 3 | [] | no_license | <?php
class CM_Enqueue_Scripts {
public function __construct() {
add_action( 'wp_enqueue_scripts', array($this, 'cm_enqueue_scripts'), 20);
}
public static function init() {
$instance = false;
if(!$instance) {
$instance = new CM_Enqueue_Scripts;
}
return $instance;
}
function cm_enqueue_script... | true |
9659d24028839967e6ba2355248a28b241239e4c | PHP | princeton/Kurogo-Mobile-Web | /templates/modules/calendar/CalendarModule.php | UTF-8 | 25,159 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Module
* @subpackage Calendar
*/
/**
*/
require_once realpath(LIB_DIR.'/DateTimeUtils.php');
/**
*/
require_once realpath(LIB_DIR.'/ICalendar.php');
define('DAY_SECONDS', 24*60*60);
/**
* @package Module
* @subpackage Calendar
*/
class CalendarModule extends Module {
protected... | true |
e7189318226fdead50a707ddc9ea31b9fce5ba36 | PHP | Multibrain/baum | /src/Baum/Generators/ModelTraitGenerator.php | UTF-8 | 486 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Baum\Generators;
class ModelTraitGenerator extends Generator {
/**
* Add trait to class at a given path.
*
* @param string $name
* @param string $path
* @return string
*/
public function addTrait($name, $path) {
$source = $this->files->get($path);
$pos = strpos($sour... | true |
e98f92c29a3a518a2cba467ee4a3660dd91a04cd | PHP | KrasimiraGeorgieva/Programming-Basics-with-PHP-January-2018 | /3. Simple-Conditions/14.Time + 15 Minutes.php | UTF-8 | 1,315 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
// Да се напише програма, която чете час и минути от 24-часово денонощие,
// въведени от потребителя, и изчислява колко ще е часът след 15 минути.
// Резултатът да се отпечата във формат hh:mm. Часовете винаги са между 0 и 23,
// а минутите винаги са между 0 и 59. Часовете се изписват с една или две цифри.
// ... | true |
99b30274d8348800667b1d2be57e3f738a3bf776 | PHP | Finnology/oro-platform | /src/Oro/Bundle/EntityBundle/Tools/DatabaseChecker.php | UTF-8 | 2,345 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Oro\Bundle\EntityBundle\Tools;
use Doctrine\DBAL\Connection;
use Doctrine\Persistence\ManagerRegistry;
use Oro\Bundle\DistributionBundle\Handler\ApplicationState;
/**
* Check if required tables exists in database
*/
class DatabaseChecker
{
protected ManagerRegistry $doctrine;
/** @var stri... | true |
a088b5fe5d24782c43d56292c536a9ab42a5e3f2 | PHP | Jodyheryanto/Book_Choice | /server/app/Http/Controllers/UserController.php | UTF-8 | 3,442 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use Validator;
class UserController extends Controller
{
public function index()
{
$users = User::get();
if(sizeof($users) == 0){
return response()->json([
"message" => "No user recor... | true |
9434b8134dea5d8483ae2e2eea2281e255e5d698 | PHP | sroze/SocialShareBundle | /Entity/OAuth2Token.php | UTF-8 | 1,706 | 2.890625 | 3 | [] | no_license | <?php
namespace SRIO\SocialShareBundle\Entity;
class OAuth2Token extends AuthToken
{
protected $refreshToken;
protected $expirationDate;
/**
* Set the $id
*
* @param unknown_type
*/
public function setId($id)
{
$this->id = $id;
}
/**
* Return the remai... | true |
bbee26f5a33da24a88f08d7fbfcad0ffdd817db4 | PHP | Louis94/WordpressBundle | /Model/Comment.php | UTF-8 | 6,195 | 2.640625 | 3 | [] | no_license | <?php
namespace Kayue\WordpressBundle\Model;
class Comment implements CommentInterface
{
/**
* @var int $id
*/
protected $id;
/**
* @var string $author
*/
protected $author;
/**
* @var string $authorEmail
*/
protected $authorEmail = '';
/**
* @var stri... | true |
80d4686306b038d64f25cdd8c7cdccca6a1f4d21 | PHP | hakobyanheghine/restaurant-recommender-backend | /modules/api/test_item_cf.php | UTF-8 | 1,947 | 2.984375 | 3 | [] | no_license | <?php
$start = microtime(true);
// $users = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
// $items = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
$ratings = UserItemManager::getInstance()->constructUserItemMatrix(null, null);
echo "<br><br><br>";
UserItemManager::getInstance()->constructIt... | true |
696fd8100f0c545997b23c926c1aba81ae2c525c | PHP | LuisFilipePedroso/Mvc-Github-Api- | /controllers/UserController.php | UTF-8 | 2,801 | 2.921875 | 3 | [] | no_license | <?php
require('../models/mysql/UserDAO.php');
require('../models/UserBO.php');
class UserController {
private $user;
function __construct() {
$this->user = new UserBO(new UserDAO());
}
private function makeRequest($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url... | true |
a9d46f5c72d61319edca44e34acf774ee6329137 | PHP | asqyL/phphw | /task1.php | UTF-8 | 840 | 3.953125 | 4 | [] | no_license | <!-- Дано число $num=800.
Делите его на 2 столько раз, пока результат деления не станет меньше 50.
Какое число получится?
Посчитайте количество итераций, необходимых для этого
(итерация - это проход цикла).
Решите задачу сначала через цикл while, а потом через цикл for -->
<?php
$num = 800;
$i = 0;
while (... | true |
52539dbd3dd151345a8e3b906d5a6def2f29c7b9 | PHP | zhengide/HessianPHP | /unit_tests/php_test_server.php | UTF-8 | 3,523 | 3 | 3 | [
"MIT"
] | permissive | <?php
include_once('../src/HessianService.php');
class ParamObject{
var $test = 'Hola hessian';
var $stringVar = 'vaca';
var $hashVar;
}
class HessianTest{
function testEcho($value){
return $value;
}
function testStringToBoolean($param){
return (bool)$param;
}
function testConcatString($param1,$param2... | true |
ef3b708d292707bfbdaf6bb33bf8d346c334a425 | PHP | manis6062/agendatool | /application/controllers/linkedin/Auth.php | UTF-8 | 1,650 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Auth extends Frontend_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->model('api_model');
//session_start();
}
public function index()
{
$api_details = $this->api_model->get_api()->result_array();
$base_url ... | true |
9ca5365ef3168d14970d540d91f45bd35c3a34b7 | PHP | Guepardo/EgressoOnline_PHP | /Model/Turma.php | UTF-8 | 1,212 | 2.59375 | 3 | [] | no_license | <?php
#### START AUTOCODE
/**
* Classe generada para a tabela "turma"
* in 2015-11-09
* @author Hugo Ferreira da Silva
* @link http://www.hufersil.com.br/lumine
* @package Model
*
*/
class Turma extends Lumine_Base {
public $id;
public $foto;
public $ano;
public $semestre;
public $egre... | true |
5879363792210d6fae4c26aad4f9a41042fa94b3 | PHP | marciomrs4/php | /basico/aula2/ifelse.php | UTF-8 | 146 | 3.328125 | 3 | [] | no_license | <?php
$var1 = 5;
$var2 = 5;
if($var1 == $var2){
echo 'Sao Iguais';
}else{
echo 'Nao sao iguais';
}
echo gettype($var2);
echo PHP_EOL;
?>
| true |
d575f9d4dc41a9b3747f45a88b6c4f68e2513c2b | PHP | P79N6A/sosoframework | /superphp/SOSO/Base/Data/ProxyRelay.php | GB18030 | 4,184 | 2.546875 | 3 | [] | no_license | <?php
/**
* @author moonzhang <zyfunny@gmail.com>
* @version 1.0 2009-05-05
*
* Proxy relay list
*/
class SOSO_Base_Data_ProxyRelay extends SOSO_Base_Data_Proxy implements IteratorAggregate {
/**
*
*
* @var int
*/
private $mMaxRequestNum = 50;
private $mProxy;
private $mLastRequest =... | true |
821c5d8367f94313cf47d90b1041870669f43e58 | PHP | kpales/Europeangreendeal | /twentytwenty-child/code-validation/invitations-a.php | UTF-8 | 2,444 | 2.984375 | 3 | [] | no_license | <?php $url=getAddress();
if (strpos($url, "code") == false){
echo '<h5 style="margin-left: 3.4rem">Dieser Registrierungslink ist nicht gültig<br/>';
echo '<span class="en-lang-link">This registration link is not valid</span></h5>';
die();
}
$id = substr($url, strpos($url, "code") + strlen("code"), 6);
... | true |
5bd255db4a7ad6e5e0a77b169145ca650b6bd394 | PHP | anpandu/nasigoreng | /tests/controllers/TagCtrlTest.php | UTF-8 | 4,642 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\ORM\Tag;
use App\Models\ORM\Post;
use App\Models\ORM\Category;
use App\Models\ORM\User;
class TagCtrlTest extends TestCase {
private $obj;
private static $endpoint = 'api/tag';
public function setUp()
{
parent::setUp();
$this->obj = $this->setUpObj();
}
public function tearDown()
... | true |
b82c006ee8f032e7f26449563e976585e74f3021 | PHP | bigprof-software/online-rental-property-manager | /app/updateDB.php | UTF-8 | 10,504 | 2.75 | 3 | [
"LicenseRef-scancode-free-unknown",
"MIT"
] | permissive | <?php
// check this file's MD5 to make sure it wasn't called before
$tenantId = Authentication::tenantIdPadded();
$setupHash = __DIR__ . "/setup{$tenantId}.md5";
$prevMD5 = @file_get_contents($setupHash);
$thisMD5 = md5_file(__FILE__);
// check if this setup file already run
if($thisMD5 != $prevMD5) {... | true |
eb6e682e1a79614e73772870e4cab459215efc19 | PHP | Diddyy/filament | /packages/forms/src/Components/BaseFileUpload.php | UTF-8 | 17,604 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Filament\Forms\Components;
use Closure;
use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Filesystem\FilesystemAdapter;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use Illuminate\... | true |
49b68ae8f89ecbd84eaf47fde2497281e8f48753 | PHP | saulhoward/haddock-cms | /core/tags/20080221/admin/admin-includes/pages/manage-users/redirect-script.inc.php | UTF-8 | 6,643 | 2.796875 | 3 | [] | no_license | <?php
/**
* Redirect script for the "manage-users" admin page.
*
* @copyright Clear Line Web Design, 2007-08-27
*/
//header('Content-Type: text/plain');
//echo 'print_r($_GET)' . "\n";
//print_r($_GET);
//echo 'print_r($_POST)' . "\n";
//print_r($_POST);
//echo 'print_r($_SESSION)' . "\n";
//print_r($_SESSION);
/... | true |
5add351763940724aa6e17b77cce7bcab93d38eb | PHP | samuelsonbrito/diagrama-de-classes-em-codigo | /associacao/index.php | UTF-8 | 422 | 2.78125 | 3 | [] | no_license | <?php
require_once 'Fabricante.php';
require_once 'Produto.php';
$fabricante = new Fabricante();
$fabricante->setNome("Pepsi");
$fabricante->setCnpj("123456789");
$produto = new Produto();
$produto->setDescricao("Toddynho");
$produto->setEstoque(1000);
$produto->setPreco(1.50);
$produto->setFabricante($fabricante);... | true |
82fd29f7f72776eae947730aced7aa729c6dc982 | PHP | verdonarthur/CoursJavascriptHEIGMedia | /laravel/app/Services/Normalizer.php | UTF-8 | 6,879 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Services;
/**
* Normalizer pour les chaines de caractère utf-8 (Classe statique)
*
* http://www.julp.fr/articles/3-php-et-utf-8.html
* http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
*
*/
class StringNormalizer
{
const DEFAULT_LOCAL = 'FR_fr';
/**
* Locale
*
* ... | true |
df99b14221cfecaef39bb5a6991b267ae459456d | PHP | ravikiradoo/portfolio | /message.php | UTF-8 | 681 | 2.59375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "id490774_ravi";
$password = "ravi@iiit";
try {
$conn = new PDO("mysql:host=$servername;dbname=id490774_message", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$email=$_POST['ema... | true |
c12cf716f1d77483bd100e85715034eac2922054 | PHP | ajegu/gauntifact | /src/Entity/Deck.php | UTF-8 | 3,818 | 2.75 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\DeckRepository")
*/
class Deck
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type=... | true |
db1de609ae173d2cdd3dd199fd2542ef8dd0311c | PHP | harsha76554/Performance-Metrics-Monitoring-Tool | /add.php | UTF-8 | 3,059 | 2.765625 | 3 | [] | no_license | <?php
//$host = "localhost";
//$username = "root";
//$password = "ubuntu";
//$database = "Devices";
//$port = "161";
require 'db.php';
// Create connection
$conn = mysqli_connect($host, $username,$password,$database,$port);
// Check connection
if (!$conn) {
die("Connection failed: ".mysqli_connect_error());
}
... | true |
48a8404038f516d6245801d200986dd0f0fd3957 | PHP | bill-barron/GroceryListApi | /api/v1/Config.example.php | UTF-8 | 541 | 2.703125 | 3 | [] | no_license | <?php
class Config {
// Database connection info and credentials
const HOSTNAME = 'localhost';
const DATABASE = 'mydb';
const USERNAME = 'myuser';
const PASSWORD = 'mypass';
// List all valid SQL tables in your database
public static $TABLES = array(
'grocery_items',
... | true |