├── .gitignore
├── LICENSE
├── README-ru.md
├── README.md
├── main
├── adv
│ ├── 01.jpg
│ ├── 02.jpg
│ ├── 03.jpg
│ └── index.php
├── commercial.php
├── css
│ ├── backButton.png
│ ├── background.png
│ ├── bootstrap.min.css
│ ├── chevron.png
│ ├── closebox@2x.png
│ ├── font
│ │ ├── UKIJTUZ.TTF
│ │ └── ug.css
│ ├── index.php
│ ├── menes-rtl.min.css
│ ├── menes.min.css
│ ├── misc-rtl.min.css
│ ├── misc.min.css
│ ├── next.png
│ ├── pinstripes.png
│ ├── preview.png
│ ├── scroll.min.css
│ ├── slider.png
│ ├── switch-on.png
│ ├── toolButton.png
│ ├── toolbar.png
│ └── uploader.png
├── downloads.php
├── downloads
│ └── index.php
├── icon
│ ├── default
│ │ ├── alipay.png
│ │ ├── alipay_text.png
│ │ ├── alipay_text_en.png
│ │ ├── changelog.png
│ │ ├── cydia.png
│ │ ├── email.png
│ │ ├── facebook.png
│ │ ├── index.php
│ │ ├── moreinfo.png
│ │ ├── msg_bg.png
│ │ ├── packages.png
│ │ ├── paypal.png
│ │ ├── qq.png
│ │ ├── report.png
│ │ ├── screenshots.png
│ │ ├── support_0.png
│ │ ├── support_1.png
│ │ ├── support_2.png
│ │ ├── support_3.png
│ │ ├── twitter.png
│ │ ├── unknown.png
│ │ ├── video.png
│ │ ├── web.png
│ │ └── weibo.png
│ └── index.php
├── index.php
├── install
│ ├── CydiaIcon.png
│ ├── css
│ │ ├── false.png
│ │ ├── main.css
│ │ └── true.png
│ ├── favicon.ico
│ ├── function.php
│ ├── index.php
│ ├── installer-db.php
│ ├── setup-check.php
│ ├── setup-config.php
│ └── setup-install.php
├── js
│ ├── cytyle.js
│ ├── fastclick.js
│ ├── index.php
│ ├── main.js
│ ├── menes.js
│ ├── misc.js
│ ├── password-strength.js
│ ├── password-strength.min.js
│ ├── scroll.js
│ ├── zxcvbn-async.min.js
│ └── zxcvbn.min.js
├── lists.php
├── manage
│ ├── about.php
│ ├── build.php
│ ├── center.php
│ ├── css
│ │ ├── animation-shake.css
│ │ ├── bootstrap-rtl.min.css
│ │ ├── bootstrap.min.css
│ │ ├── corepage.css
│ │ ├── default.ttf
│ │ ├── index.php
│ │ └── misc.min.css
│ ├── edit.php
│ ├── header.php
│ ├── hint.php
│ ├── import.php
│ ├── index.php
│ ├── javascript
│ │ ├── backend
│ │ │ ├── login.js
│ │ │ ├── login.min.js
│ │ │ ├── mbar.js
│ │ │ └── misc.js
│ │ └── pace.min.js
│ ├── login.php
│ ├── manage.php
│ ├── output.php
│ ├── plugins
│ │ ├── ajaxfileupload
│ │ │ ├── ajaxfileupload.js
│ │ │ └── ajaxfileupload.min.js
│ │ ├── jqBootstrapValidation
│ │ │ └── jqBootstrapValidation.min.js
│ │ ├── kindeditor
│ │ │ ├── kindeditor.min.js
│ │ │ ├── lang
│ │ │ │ ├── ar.js
│ │ │ │ ├── en_US.js
│ │ │ │ ├── ko.js
│ │ │ │ ├── ug_CN.js
│ │ │ │ ├── zh_CN.js
│ │ │ │ └── zh_TW.js
│ │ │ ├── php
│ │ │ │ ├── JSON.php
│ │ │ │ ├── file_manager_json.php
│ │ │ │ └── upload_json.php
│ │ │ ├── plugins
│ │ │ │ ├── filemanager
│ │ │ │ │ ├── filemanager.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── file-16.gif
│ │ │ │ │ │ ├── file-64.gif
│ │ │ │ │ │ ├── folder-16.gif
│ │ │ │ │ │ ├── folder-64.gif
│ │ │ │ │ │ └── go-up.gif
│ │ │ │ ├── image
│ │ │ │ │ ├── image.js
│ │ │ │ │ └── images
│ │ │ │ │ │ ├── align_left.gif
│ │ │ │ │ │ ├── align_right.gif
│ │ │ │ │ │ ├── align_top.gif
│ │ │ │ │ │ └── refresh.png
│ │ │ │ ├── link
│ │ │ │ │ └── link.js
│ │ │ │ └── multiimage
│ │ │ │ │ ├── images
│ │ │ │ │ ├── image.png
│ │ │ │ │ ├── select-files-en.png
│ │ │ │ │ ├── select-files-zh_CN.png
│ │ │ │ │ └── swfupload.swf
│ │ │ │ │ └── multiimage.js
│ │ │ └── themes
│ │ │ │ ├── common
│ │ │ │ ├── anchor.gif
│ │ │ │ ├── blank.gif
│ │ │ │ ├── flash.gif
│ │ │ │ ├── loading.gif
│ │ │ │ ├── media.gif
│ │ │ │ └── rm.gif
│ │ │ │ ├── default
│ │ │ │ ├── background.png
│ │ │ │ ├── default.css
│ │ │ │ └── default.png
│ │ │ │ ├── qq
│ │ │ │ ├── editor.gif
│ │ │ │ └── qq.css
│ │ │ │ └── simple
│ │ │ │ └── simple.css
│ │ ├── modernizr
│ │ │ └── modernizr.min.js
│ │ ├── parsley
│ │ │ └── parsley.min.js
│ │ └── uploadify
│ │ │ ├── css
│ │ │ ├── uploadify-cancel.png
│ │ │ └── uploadify.css
│ │ │ ├── js
│ │ │ └── jquery.uploadify.js
│ │ │ ├── uploadify.php
│ │ │ └── uploadify.swf
│ ├── release.php
│ ├── robots.txt
│ ├── sections.php
│ ├── settings.php
│ ├── stats.php
│ ├── stylesheet
│ │ ├── fonts
│ │ │ ├── iconfont.eot
│ │ │ ├── iconfont.svg
│ │ │ ├── iconfont.ttf
│ │ │ └── iconfont.woff
│ │ ├── layout.min.css
│ │ ├── uielement-rtl.min.css
│ │ └── uielement.min.css
│ ├── udid.php
│ ├── upload.php
│ └── view.php
├── misc.php
├── robots.txt
├── system
│ ├── class
│ │ ├── core.php
│ │ ├── corepage.php
│ │ ├── db.php
│ │ ├── error.php
│ │ ├── locale.php
│ │ ├── mobile_detect.php
│ │ ├── tar.php
│ │ ├── updater.php
│ │ └── validatecode.php
│ ├── common.inc.php
│ ├── config
│ │ ├── autofill.inc.default.php
│ │ ├── config.inc.default.php
│ │ ├── connect.inc.default.php
│ │ ├── empty_icon.deb
│ │ ├── gnupg.inc.default.php
│ │ └── index.php
│ ├── function
│ │ ├── core.php
│ │ ├── downfile.php
│ │ ├── manage.php
│ │ └── updater
│ │ │ ├── 1.5.php
│ │ │ ├── 1.6.php
│ │ │ └── 1.7.php
│ └── languages
│ │ ├── install-ru.mo
│ │ ├── install-ru.po
│ │ ├── install-ug_CN.mo
│ │ ├── install-ug_CN.po
│ │ ├── install-zh_CN.mo
│ │ ├── install-zh_CN.po
│ │ ├── l10n.php
│ │ ├── manage-ru.mo
│ │ ├── manage-ru.po
│ │ ├── manage-ug_CN.mo
│ │ ├── manage-ug_CN.po
│ │ ├── manage-zh_CN.mo
│ │ ├── manage-zh_CN.po
│ │ ├── pomo
│ │ ├── entry.php
│ │ ├── mo.php
│ │ ├── po.php
│ │ ├── streams.php
│ │ └── translations.php
│ │ ├── ru.mo
│ │ ├── ru.po
│ │ ├── system-ru.mo
│ │ ├── system-ru.po
│ │ ├── system-ug_CN.mo
│ │ ├── system-ug_CN.po
│ │ ├── system-zh_CN.mo
│ │ ├── system-zh_CN.po
│ │ ├── ug_CN.mo
│ │ ├── ug_CN.po
│ │ ├── zh_CN.mo
│ │ └── zh_CN.po
└── upload
│ └── index.php
├── readme-zh_CN.html
├── readme.files
├── colorschememapping.xml
├── dcrm_apache.htaccess
├── dcrm_lighttpd.conf
├── dcrm_nginx.conf
├── filelist.xml
├── how_to_host_cydia_repo.pdf
└── themedata.thmx
└── update.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows:
2 | Thumbs.db
3 | ehthumbs.db
4 | Desktop.ini
5 |
6 | # OS X:
7 | .DS_Store
8 |
9 | # WEIPDCRM:
10 | *.espressostorage
11 | main/favicon.ico
12 | main/CydiaIcon.png
13 | main/Packages
14 | main/Release
15 | main/Packages.gz
16 | main/Packages.bz2
17 | main/system/version.inc.php
18 | main/system/config/autofill.inc.php
19 | main/system/config/config.inc.php
20 | main/system/config/connect.inc.php
21 | main/system/config/gnupg.inc.php
22 | main/system/config/release.save
23 | main/system/languages/*zh_CN.*
24 | main/tmp/
25 | main/image/
26 | main/icons/*
27 | !main/icons/default/
28 | main/upload/*.deb
29 | main/downloads/*/
30 |
31 | main/.idea/*
32 |
--------------------------------------------------------------------------------
/README-ru.md:
--------------------------------------------------------------------------------
1 | # WEIPDCRM #
2 | Darwin Cydia Repository Manager
3 |
4 | Это панель управления репозиторием с открытм исходным кодом для Saurik's Cydia™.
5 | Эта программа - ремэйк "[DCRM](https://github.com/tibounise/DCRM)", и мы добавили около 95% функций в эту замечательную панель.
6 |
7 | Russian Translator: [shlyahten](https://github.com/shlyahten/WEIPDCRM-Rus)
8 |
9 | ##Посмотреть онлайн:
10 | 1. http://cydia.shlyahten.ru - w/ Russian
11 | 2. ~~http://apt.82flex.com~~ (closed)
12 | 3. http://apt.touchsprite.com
13 | 4. http://cydia.minwenlsm.pw
14 | 5. http://apt.sunbelife.com
15 |
16 | ##Системные требования:
17 | **минимум:**
18 |
19 | 1. PHP Version >= 5.3 и MySQL
20 | 2. MySQL или MariaDB
21 | 3. Nginx, Apache или Lighttpd
22 |
23 | **рекомендуется:**
24 |
25 | 1. Поддержка GD и BZ2
26 | 2. GunPG Command Line Tools
27 |
28 | ##Установка и использование:
29 | 1. Загрузите содержимое `/main/*` в свой wwwroot (корень) затем дайте файлам разрешения на чтение и запись (CHMOD).
30 | 2. **Nginx:** Скопируйте `/readme.files/dcrm_nginx.conf` в Nginx's директорию с настройками, затем включите в конфигурацию сайта.
**Lighttpd:** Включите `/readme.files/dcrm_lighttpd.conf`.
31 | 3. Перезагрузите сервер если это требуется.
32 | 4. Откройте `http://{YOUR_REPO_URL}/install` для преднастройки и установки DCRM.
33 | 5. Затем войдите `http://{YOUR_REPO_URL}/manage`.
34 | 6. Заполните пустые поля `http://{YOUR_REPO_URL}/manage/settings.php` и `http://{YOUR_REPO_URL}/manage/release.php`
35 | 7. Загрузите deb пакет и импортируйте его либо замените старую версию новой, теперь вы можете изменять информацию *(такую как Identifier, Author, Name, Depends, etc.)*.
36 | 8. Свободно изменяйте пакет, нажимайте на заголовок каждого поля и он заполнится автоматически. WEIPDCRM имеет хорошую страницу описания, и вы можете добавить туда скриншотов нажав на заголовок пакета.
37 | 9. Нажмите "*Показать пакет*" или "*Скрыть пакет*" чтобы сделать его видимым или нет.
38 | 10. Когда всё готово, нажмите "*Пересобрать*" в правом верхнем углу.
39 | 11. Add your repository in Cydia™.
40 |
41 | ##How To Upgrade
42 | ####1.5 Pro or latter
43 | Just upload files you get to replace. Then visit your repository homepage. It will auto update the database and configuration.
44 | ####Earlier than 1.5 Pro
45 | Upload and replace files without `init` directory, `config.inc.php` and `connect.php` to Site Directory.
46 | Depending on the order execution database commands from `update.log`.
47 |
48 | ##Donations
49 | WEIPDCRM Basic and WEIPDCRM Pro are both free software, but you can donate to support the developer.
50 |
51 | **i_82:** http://82flex.com/about
52 |
53 | **Hintay:**
54 | Paypal: [](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ljf120%40gmail%2ecom&item_name=Hintay&item_number=WEIPDCRM&no_note=0¤cy_code=USD)
55 | Alipay: [
](http://blog.kugeek.com/go/alipay.html)
56 |
57 |
58 | ##License
59 | Copyright © 2013-2016 Zheng Wu & Hintay
60 |
61 | The program is distributed under the terms of the GNU Affero General Public License.
62 |
63 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
64 |
65 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
66 |
67 | You should have received a copy of the GNU Affero General Public License along with this program. If not, see .
68 |
69 | We also offer a commercial license and technical supports, contact hintay@me.com for more details.
70 |
--------------------------------------------------------------------------------
/main/adv/01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/adv/01.jpg
--------------------------------------------------------------------------------
/main/adv/02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/adv/02.jpg
--------------------------------------------------------------------------------
/main/adv/03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/adv/03.jpg
--------------------------------------------------------------------------------
/main/adv/index.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | error_reporting(0);
22 | $r = rand(1, 3);
23 | $pic = "0" . $r . ".jpg";
24 | ob_start();
25 | header('HTTP/1.1 301 Moved Permanently');
26 | header("Location: " . $pic);
27 | ?>
--------------------------------------------------------------------------------
/main/commercial.php:
--------------------------------------------------------------------------------
1 |
5 | *
6 | * This file is part of WEIPDCRM.
7 | *
8 | * WEIPDCRM is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * WEIPDCRM is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License
19 | * along with WEIPDCRM. If not, see .
20 | *
21 | * Designed by Hintay in China
22 | */
23 |
24 | if (!isset($package_info)) {
25 | if(!isset($_GET['Package']))
26 | exit();
27 |
28 | if(!defined('SYSTEM_STARTED')){
29 | require_once('system/common.inc.php');
30 | base_url();
31 | }
32 |
33 | if(!isset($detect)){
34 | class_loader('Mobile_Detect');
35 | $detect = new Mobile_Detect;
36 | }
37 | $package_info = DB::fetch_first(DB::prepare("SELECT `Package`, `Name`, `Tag`, `Level`, `Price`, `Purchase_Link` FROM `".DCRM_CON_PREFIX."Packages` WHERE `Package` = '%s' AND `Stat` = '1'", $_GET['Package']));
38 | if(!$package_info)
39 | exit();
40 | ?>
41 |
42 |
43 |
44 |
45 | Activation · Cydia
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | $package_level)
75 | $candownloaded = true;
76 | }
77 | }
78 |
79 | if($candownloaded) {
80 | //$not_installed_button = 'null, null, null';
81 | $purchase_status = 'candownload';
82 | $fieldset_color = '#eefff0';
83 | $fieldset_icons = 'https://cache.saurik.com/crystal/256x256/actions/agt_action_success.png';
84 | } else {
85 | $fieldset_color = '#ffc040';
86 | //$not_installed_button = '"'.__('Recheck').'", "Highlighted", function(){reload_();}';
87 | $purchase_status = 'protection';
88 | $fieldset_icons = 'https://cache.saurik.com/crystal/64x64/apps/alert.png';
89 | }
90 | ?>
91 |
118 |
--------------------------------------------------------------------------------
/main/css/backButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/backButton.png
--------------------------------------------------------------------------------
/main/css/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/background.png
--------------------------------------------------------------------------------
/main/css/chevron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/chevron.png
--------------------------------------------------------------------------------
/main/css/closebox@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/closebox@2x.png
--------------------------------------------------------------------------------
/main/css/font/UKIJTUZ.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/font/UKIJTUZ.TTF
--------------------------------------------------------------------------------
/main/css/font/ug.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: UKIJTUZ;
3 | src: url('UKIJTUZ.TTF');
4 | }
5 | body, pinput, button, select, textarea , p{font-family: UKIJTUZ,"Helvetica Neue",Helvetica,Arial,sans-serif;}
6 | .manage abel, .manage input, .manage button, .manage select, .manage textarea, .manage p, .well{font-size: 16px;}
7 | .manage #logo, .manage #logo p{font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;}
--------------------------------------------------------------------------------
/main/css/index.php:
--------------------------------------------------------------------------------
1 | footer > p{text-align: center;}
3 | panel > block{direction:rtl;}
4 | panel > label{direction:rtl;}
5 | .author p, .maintainer p, .changelog p{direction:rtl;}
6 | .changelog p{display:block}
--------------------------------------------------------------------------------
/main/css/misc-rtl.min.css:
--------------------------------------------------------------------------------
1 | html{direction:rtl;}
--------------------------------------------------------------------------------
/main/css/misc.min.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 100px;
3 | background: #ffffff;
4 | background: -moz-radial-gradient(center, ellipse cover, #ffffff 0%, #e5e5e5 100%);
5 | background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5));
6 | background: -webkit-radial-gradient(center, ellipse cover, #ffffff 0%,#e5e5e5 100%);
7 | background: -o-radial-gradient(center, ellipse cover, #ffffff 0%,#e5e5e5 100%);
8 | background: -ms-radial-gradient(center, ellipse cover, #ffffff 0%,#e5e5e5 100%);
9 | background: radial-gradient(center, ellipse cover, #ffffff 0%,#e5e5e5 100%);
10 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=1 );
11 | font-family: Arial,Helvetica,sans-serif;
12 | font-size: 10pt;
13 | }
14 | .well {
15 | margin-left: auto;
16 | margin-right: auto;
17 | width: 450px;
18 | text-align: center;
19 | }
20 | .add_image{
21 | background-image: url(preview.png);
22 | width: 300px;
23 | height: 160px;
24 | background-size:300px 160px;
25 | border-radius: 6px;
26 | margin-left:auto;
27 | margin-right:auto;
28 | position:relative;
29 | font-family: "Helvetica Neue", Helvetica, "Heiti SC", "冬青黑体简体中文", Arial,sans-serif;
30 | moz-user-select: -moz-none;
31 | -moz-user-select: none;
32 | -o-user-select:none;
33 | -khtml-user-select:none;
34 | -webkit-user-select:none;
35 | -ms-user-select:none;
36 | user-select:none;
37 | }
38 | .add_image > .repo_text{
39 | text-align: left;
40 | z-index:99;
41 | top: 57px;
42 | left: 59px;
43 | position:absolute;
44 | width: 181px;
45 | font-size:12px;
46 | }
47 | .add_image > .input_text{
48 | z-index:100;
49 | font-weight:bold;
50 | padding-top: 30px;
51 | }
52 | .add_image > .button{
53 | position:absolute;
54 | width: 105px;
55 | height: 35px;
56 | line-height: 35px;
57 | color: #017aff;
58 | }
59 | .add_image > .cancel{
60 | top: 85px;
61 | left: 45px;
62 | }
63 | .add_image > .add{
64 | top: 85px;
65 | right: 45px;
66 | font-weight:bold;
67 | }
68 | .add_image > .repo{
69 | position:absolute;
70 | bottom: 0px;
71 | width: 300px;
72 | height: 40px;
73 | text-align:left;
74 | }
75 | .add_image > .repo > .repo_image > img, .add_image > .repo > .repo_image > .mask{position:absolute; width: 24px; height: 24px; border-radius: 6px;top: 8px; left: 30px;}
76 | .add_image > .repo > .repo_image > .mask{ background:#000000; z-index:200; opacity:0.4;}
77 | .add_image > .repo > .repo_title{position:absolute;left: 60px; top: 6px;font-weight:bold;color:#000000;}
78 | .add_image > .repo > .repo_url{position:absolute;left: 60px; color:#3e3e3e;bottom: 3px; font-size:10px}
79 | .add_image > .repo_text::after { display:inline-block; background:#4974FE; content:''; height:1.2em; width:2px; vertical-align:text-top; -webkit-animation:blink linear 1.2s infinite 2s; -moz-animation:blink linear 1.2s infinite 2s; -ms-animation:blink linear 1.2s infinite 2s; animation:blink linear 1.2s infinite 2s;margin-left: 1px;}
80 | @-webkit-keyframes blink{ 0%,49%,100%{ opacity:0;} 50%,99%{ opacity:1;}}
81 | @-moz-keyframes blink{ 0%,49%,100%{ opacity:0;} 50%,99%{ opacity:1;}}
82 | @-ms-keyframes blink{ 0%,49%,100%{ opacity:0;} 50%,99%{ opacity:1;}}
83 | @keyframes blink{ 0%,49%,100%{ opacity:0;} 50%,99%{ opacity:1;}}
--------------------------------------------------------------------------------
/main/css/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/next.png
--------------------------------------------------------------------------------
/main/css/pinstripes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/pinstripes.png
--------------------------------------------------------------------------------
/main/css/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/preview.png
--------------------------------------------------------------------------------
/main/css/scroll.min.css:
--------------------------------------------------------------------------------
1 | html{height: 100%;}
2 | body{height: 100%;}
3 | panel{height: 100%;}
4 | .horizontal-scroll-wrapper{height:100%;background: transparent;outline-top:1px solid rgba(255,255,255,0.33);outline-bottom:1px solid rgba(255,255,255,0.33);overflow-x:scroll;width:100%;position:relative;z-index:1;}
5 | .horizontal-scroll-area{z-index:1;margin:25px 0 5px;}
6 | .horizontal-scroll-area img{width:215px;border:1px solid rgba(255,255,255,0.4);outline:1px solid rgba(0,0,0,0.1);margin:0 0 0 13px;}
7 | .pip{opacity:0.3;color:#FFF;font-family:'Courier New', Courier, fixed-width;font-size:150%;}
8 | .pip.selected{opacity:1.0;}
9 | .horizontal-scroll-pips{text-align:center;margin:0;padding:0;}
10 | .screenshot-wrapper{height: 100%;}
11 | .background{width: 100%;height: 100%;background-position: center;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;position: absolute;z-index: 1;}
12 | .blur{-webkit-filter: blur(5px);filter: blur(5px);}
--------------------------------------------------------------------------------
/main/css/slider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/slider.png
--------------------------------------------------------------------------------
/main/css/switch-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/switch-on.png
--------------------------------------------------------------------------------
/main/css/toolButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/toolButton.png
--------------------------------------------------------------------------------
/main/css/toolbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/toolbar.png
--------------------------------------------------------------------------------
/main/css/uploader.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/css/uploader.png
--------------------------------------------------------------------------------
/main/downloads.php:
--------------------------------------------------------------------------------
1 |
5 | * Copyright (c) 2015 i_82
6 | *
7 | * This file is part of WEIPDCRM.
8 | *
9 | * WEIPDCRM is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as published by
11 | * the Free Software Foundation, either version 3 of the License, or
12 | * (at your option) any later version.
13 | *
14 | * WEIPDCRM is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with WEIPDCRM. If not, see .
21 | */
22 |
23 | if (!file_exists('./system/config/connect.inc.php')) {
24 | header("HTTP/1.1 500 Internal Server Error");
25 | header("Status: 500 Internal Server Error");
26 | exit();
27 | }
28 | $_customct = true;
29 | require_once('system/common.inc.php');
30 | set_time_limit(0);
31 | @ini_set("max_execution_time", 1800);
32 | base_url();
33 |
34 | if (!empty($_GET['request']) && (!empty($_SERVER['HTTP_X_UNIQUE_ID']) || DCRM_DIRECT_DOWN == 1)) {
35 | $r_path = $_GET['request'];
36 |
37 | $php_forward = get_option('php_forward');
38 | $webserver = explode('/', $_SERVER['SERVER_SOFTWARE']);
39 | // Apache URL重写模式下无法使用X-sendfile,因此在此处跳转
40 | if($webserver[0] == 'Apache' && $php_forward == 1 && strstr($_SERVER["REQUEST_URI"], '/debs/') != false){
41 | header('Location: '.url_scheme().SITE_URL.'downloads.php?request='.$r_path);
42 | exit();
43 | }
44 |
45 | if (pathinfo($r_path, PATHINFO_EXTENSION) != "deb") {
46 | httpinfo(400);
47 | } else {
48 | $text_id = substr($r_path, 0, strlen($r_path) - 4);
49 | if (ctype_digit($text_id) && intval($text_id) <= 10000) {
50 | $request_id = intval($text_id);
51 | } else {
52 | httpinfo(405);
53 | exit();
54 | }
55 | }
56 | $m_row = DB::fetch_first("SELECT `Package`, `Version`, `Architecture`, `Filename`, `Tag`, `DownloadTimes`, `Level` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '" . (string)$request_id . "'");
57 |
58 | if (!$m_row) {
59 | httpinfo(404);
60 | } else {
61 | $download_path = substr($m_row['Filename'], 1);
62 | }
63 | if (!empty($download_path)) {
64 | if (file_exists($download_path)) {
65 | $fake_name = $m_row['Package'] . "_" . $m_row['Version'] . "_" . $m_row['Architecture'] . ".deb";
66 | if(check_commercial_tag($m_row['Tag'])){
67 | if(isset($_SERVER['HTTP_X_UNIQUE_ID'])) {
68 | $udid_status = DB::fetch_first("SELECT `Packages`, `Level`, `Downloads` FROM `".DCRM_CON_PREFIX."UDID` WHERE `UDID` = '".$_SERVER['HTTP_X_UNIQUE_ID']."' LIMIT 1");
69 | if(!empty($udid_status)){
70 | if(!empty($udid_status['Packages'])) {
71 | $udid_packages = TrimArray(explode(',', $udid_status['Packages']));
72 | if(!in_array($m_row['Package'], $udid_packages, true)) {
73 | httpinfo(4033);
74 | }
75 | } else {
76 | $udid_level = (int)$udid_status['Level'];
77 | $package_level = (int)$m_row['Level'];
78 | if($udid_level <= $package_level) {
79 | httpinfo(4033);
80 | }
81 | }
82 | DB::update(DCRM_CON_PREFIX.'UDID', array('Downloads' => ((int)$udid_status['Downloads'] + 1)), array('UDID' => $_SERVER['HTTP_X_UNIQUE_ID']));
83 | } else {
84 | httpinfo(4033);
85 | }
86 | } else {
87 | httpinfo(4030);
88 | }
89 | }
90 | DB::update(DCRM_CON_PREFIX.'Packages', array('DownloadTimes' => ((int)$m_row['DownloadTimes'] + 1)), array('ID' => (string)$request_id));
91 | if($php_forward == 2 || $php_forward == ""){
92 | downFile($download_path, $fake_name);
93 | } else {
94 | function xsendfile_header($self_header, $relative = true){
95 | global $download_path, $fake_name;
96 | header('Accept-Ranges: bytes');
97 | header('Content-type: application/octet-stream');
98 | header('Content-Disposition: attachment; filename="' . rawurlencode($fake_name). '"');
99 | header($self_header.': '.($relative ? SITE_PATH.substr($download_path, 2) : $download_path));
100 | exit();
101 | }
102 | $module_enabled = get_option('module_enabled');
103 | switch($webserver[0]){
104 | case 'nginx':
105 | xsendfile_header('X-Accel-Redirect');
106 | break;
107 | case 'Apache':
108 | if($module_enabled == 2) {
109 | xsendfile_header('X-sendfile', false);
110 | } elseif (function_exists('apache_get_modules')) {
111 | $Mods = apache_get_modules();
112 | if(in_array('mod_xsendfile', $Mods)){
113 | xsendfile_header('X-sendfile', false);
114 | }
115 | }
116 | if(file_exists(ROOT.'downloads/.htaccess'))
117 | unlink(ROOT.'downloads/.htaccess');
118 | break;
119 | case 'Lighttpd':
120 | if($module_enabled == 2) {
121 | xsendfile_header('X-LIGHTTPD-send-file');
122 | }
123 | break;
124 | // IIS? Hehe
125 | //case 'IIS':
126 | }
127 | header('Location: '.url_scheme().SITE_URL.$download_path);
128 | exit();
129 | }
130 | } else {
131 | httpinfo(404);
132 | }
133 | exit();
134 | } else {
135 | httpinfo(500);
136 | }
137 | } else {
138 | httpinfo(400);
139 | }
140 | ?>
141 |
--------------------------------------------------------------------------------
/main/downloads/index.php:
--------------------------------------------------------------------------------
1 |
5 | *
6 | * This file is part of WEIPDCRM.
7 | *
8 | * WEIPDCRM is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * WEIPDCRM is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License
19 | * along with WEIPDCRM. If not, see .
20 | */
21 |
22 | if (file_exists('../system/config/connect.inc.php')) {
23 | header('Location: ./setup-install.php?redirect=true');
24 | } else {
25 | header('Location: ./setup-config.php?redirect=true');
26 | }
27 | ?>
--------------------------------------------------------------------------------
/main/install/installer-db.php:
--------------------------------------------------------------------------------
1 |
5 | *
6 | * This file is part of WEIPDCRM.
7 | *
8 | * WEIPDCRM is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * WEIPDCRM is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License
19 | * along with WEIPDCRM. If not, see .
20 | */
21 |
22 | if (!defined('DCRM')) exit();
23 |
24 | class DB {
25 | public $curlink;
26 | public $last_query;
27 | public $tryagain_link;
28 | private $use_mysqli = false;
29 |
30 | public function __construct() {
31 | if ( function_exists( 'mysqli_connect' ) )
32 | $this->use_mysqli = true;
33 | }
34 |
35 | function connect() {
36 | if($this->_dbconnect()) {
37 | $this->set_charset( $this->curlink, 'utf8' );
38 | $this->select_db( DCRM_CON_DATABASE );
39 | }
40 | }
41 |
42 | function _dbconnect() {
43 | $link = null;
44 | if ( $this->use_mysqli ) {
45 | $link = mysqli_connect(DCRM_CON_SERVER, DCRM_CON_USERNAME, DCRM_CON_PASSWORD);
46 | } else {
47 | $link = mysql_connect(DCRM_CON_SERVER.':'.DCRM_CON_SERVER_PORT, DCRM_CON_USERNAME, DCRM_CON_PASSWORD);
48 | }
49 | if (!$link) {
50 | $this->halt(__('ERROR: Can’t connect database server.'));
51 | return false;
52 | } else {
53 | $this->curlink = $link;
54 | return true;
55 | }
56 | }
57 |
58 | function select_db($dbname) {
59 | if($this->use_mysqli) {
60 | $result = mysqli_select_db($this->curlink, $dbname);
61 | } else {
62 | $result = mysql_select_db($dbname, $this->curlink);
63 | }
64 | return $result;
65 | }
66 |
67 | function set_charset($dbh, $charset = null, $collate = null) {
68 | if ( $this->use_mysqli ) {
69 | if ( function_exists( 'mysqli_set_charset' ) ) {
70 | mysqli_set_charset( $dbh, $charset );
71 | } else {
72 | $query = sprintf('SET NAMES %s', $charset );
73 | if ( ! empty( $collate ) )
74 | $query .= sprintf( ' COLLATE %s', $collate );
75 | mysqli_query( $query, $dbh );
76 | }
77 | } else {
78 | if ( function_exists( 'mysql_set_charset' ) ) {
79 | mysql_set_charset( $charset, $dbh );
80 | } else {
81 | $query = sprintf( 'SET NAMES %s', $charset );
82 | if ( ! empty( $collate ) )
83 | $query .= sprintf( ' COLLATE %s', $collate );
84 | mysql_query( $query, $dbh );
85 | }
86 | }
87 | }
88 |
89 | function query($sql) {
90 | if (!$this->curlink) $this->connect();
91 | if($this->use_mysqli)
92 | $query = mysqli_query($this->curlink, $sql);
93 | else
94 | $query = mysql_query($sql, $this->curlink);
95 | return $this->last_query = $query;
96 | }
97 |
98 | function _query($sql) {
99 | $result = $this->query($sql);
100 | if(!$result) $db->halt();
101 | }
102 |
103 | function num_rows($query) {
104 | $func = $this->use_mysqli ? 'mysqli_num_rows' : 'mysql_num_rows';
105 | $query = $func($query);
106 | return $query;
107 | }
108 |
109 | function error() {
110 | $func = $this->use_mysqli ? 'mysqli_error' : 'mysql_error';
111 | return (($this->curlink) ? $func($this->curlink) : $func());
112 | }
113 |
114 | function halt($message = '') {
115 | $inst_alert = $this->error();
116 | echo ($message ? ($message . '
') : '' ) . $inst_alert . $this->tryagain_link;
117 | exit();
118 | }
119 | }
--------------------------------------------------------------------------------
/main/install/setup-check.php:
--------------------------------------------------------------------------------
1 |
5 | *
6 | * This file is part of WEIPDCRM.
7 | *
8 | * WEIPDCRM is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as published by
10 | * the Free Software Foundation, either version 3 of the License, or
11 | * (at your option) any later version.
12 | *
13 | * WEIPDCRM is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License
19 | * along with WEIPDCRM. If not, see .
20 | */
21 |
22 | if (!defined("DCRM")) {
23 | exit;
24 | }
25 | $__['php_os'] = __('OS');
26 | $__['php_vers'] = __('PHP Ver');
27 | $__['gd_vers'] = __('GD Ver');
28 | $__['disk'] = __('Disk Space');
29 | $__['writeable'] = __('Writeable');
30 | $__['unwriteable'] = __('Unwriteable');
31 | $__['supportted'] = __('Supported');
32 | $__['unsupportted'] = __('Unsupported');
33 | $__['error_php_vers'] = __('Unsupported this PHP Version');
34 | $__['error_gd_vers'] = __('GD module version is too low');
35 | $__['error_disk'] = __('Not enough disk space or cannot get disk space');
36 | $__['error_./'] = __('No \'./\' directory read-write permissions');
37 | $__['error_./system/config'] = __('No \'./system/config\' directory read-write permissions');
38 | $__['error_mysql_connect( )'] = __('Mysql module not support');
39 | $__['error_fsockopen( )'] = __('Does not support the fsockopen function or the function is disabled');
40 | $__['error_fsockopen,curl( )'] = __('Does not support the fsockopen function and curl module or the function is disabled');
41 | $__['error_file_get_contents( )'] = __('Does not support the file_get_contents function or the function is disabled');
42 | $__['error_mhash( )'] = __('Does not support the mhash function or the function is disabled, maybe can not use GPG function.');
43 | $__['error_bzcompress( )'] = __('Does not support the bzcompresss function or the function is disabled, maybe can not use list compress function.');
44 | $__['error_zlib_encode( )'] = __('Does not support the zlib function or the function is disabled, maybe can not use list compress function.');
45 | $__['error_mhash,hash_hmac( )'] = __('Does not support the mhash or hash_hmac function, maybe can not use list compress function.');
46 | ?>
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | |
59 | |
60 | |
61 | |
62 | |
63 |
64 |
65 | $item):?>
66 |
67 | |
68 | |
69 | |
70 | |
71 | |
72 |
73 |
78 |
79 |
80 |
81 |
82 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | |
98 | |
99 | |
100 |
101 |
102 | $item):?>
103 |
104 | |
105 | |
106 | |
107 |
108 |
109 |
114 |
115 |
116 |
117 |
118 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | |
133 | |
134 | |
135 |
136 |
137 | $item):?>
138 |
139 | |
140 | |
141 | |
142 |
143 |
148 |
149 |
150 |
151 |
152 |
157 |
158 |
--------------------------------------------------------------------------------
/main/js/index.php:
--------------------------------------------------------------------------------
1 | 0) {
29 | c_start = document.cookie.indexOf(c_name + "=");
30 | if (c_start != -1) {
31 | c_start = c_start + c_name.length + 1;
32 | c_end = document.cookie.indexOf(";", c_start);
33 | if (c_end == -1) {
34 | c_end = document.cookie.length;
35 | }
36 | return unescape(document.cookie.substring(c_start, c_end));
37 | }
38 | }
39 | return "";
40 | }
41 | function hide() {
42 | if ($("#advertisement")[0]) {
43 | $("#advertisement").fadeOut();
44 | setCookie("hideadv", "yes", 1);
45 | }
46 | }
47 | function show() {
48 | if (getCookie("hideadv") == "yes" && $("#advertisement")[0]) {
49 | document.getElementById("advertisement").style.display = "none";
50 | }
51 | }
52 | if (isCydia != -1) {
53 | document.body.classList.add("cydia");
54 | } else {
55 | if ($("#cydialink")[0]) {
56 | document.getElementById("cydialink").style.display = "";
57 | }
58 | if ($("#downloadlink")[0]) {
59 | document.getElementById("downloadlink").style.display = "";
60 | }
61 | }
62 | if (isHistory != -1 || isCydia == -1) {
63 | if ($("#header")[0]) {
64 | document.getElementById("header").style.display = "";
65 | }
66 | if ($("#contact")[0]) {
67 | document.getElementById("contact").style.display = "";
68 | }
69 | if ($("#reportlink")[0]) {
70 | document.getElementById("reportlink").style.display = "none";
71 | }
72 | if ($("#advertisement")[0]) {
73 | document.getElementById("advertisement").style.display = "none";
74 | }
75 | if ($("#footer")[0]) {
76 | document.getElementById("footer").style.display = "";
77 | }
78 | }
79 | if (isHistory != -1) {
80 | if ($("#reportlink")[0]) {
81 | document.getElementById("reportlink").style.display = "none";
82 | }
83 | if ($("#historylink")[0]) {
84 | document.getElementById("historylink").style.display = "none";
85 | }
86 | }
87 | if (isAdv != -1) {
88 | if ($("#advertisement")[0]) {
89 | document.getElementById("advertisement").style.display = "none";
90 | }
91 | }
92 | if ($("#scroller")[0]) {
93 | new iScroll(document.getElementById("scroller"));
94 | }
95 | if ($("#loadmore")[0]) {
96 | loadPackages();
97 | }
98 | show();
--------------------------------------------------------------------------------
/main/js/misc.js:
--------------------------------------------------------------------------------
1 | var span = $("span.txt"), defTxt = span.text();
2 | span.html('');
3 | $(document).ready(function(){
4 | run_anim(span, defTxt);
5 | setInterval(function(){run_anim(span, defTxt)}, 10000);
6 | });
7 | function run_anim(span, defTxt){
8 | span.fadeOut(500);
9 | setTimeout(function(){span.html('').fadeIn(0);}, 500);
10 | setTimeout(function(){typeUrlAnim(span, defTxt);}, 1200);
11 | }
12 | function typeUrlAnim(span, txt){
13 | var
14 | currInx = 0,
15 | timer = setInterval(function(){
16 | span.html(txt.slice(7, ++currInx));
17 |
18 | if(currInx >= txt.length){
19 | clearInterval(timer);
20 | }
21 | }, 160);
22 | }
--------------------------------------------------------------------------------
/main/js/password-strength.js:
--------------------------------------------------------------------------------
1 | /* global ajaxurl, pwsL10n */
2 | (function($){
3 | function check_pass_strength() {
4 | var pass1 = $('#pass1').val(), pass2 = $('#pass2').val(), strength;
5 |
6 | $('#pass-strength-result').removeClass('short bad good strong');
7 | if ( ! pass1 ) {
8 | $('#pass-strength-result').html( pwsL10n.empty );
9 | return;
10 | }
11 |
12 | strength = dcrm.passwordStrength.meter( pass1, dcrm.passwordStrength.userInputBlacklist(), pass2 );
13 |
14 | switch ( strength ) {
15 | case 2:
16 | $('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
17 | break;
18 | case 3:
19 | $('#pass-strength-result').addClass('good').html( pwsL10n.good );
20 | break;
21 | case 4:
22 | $('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
23 | break;
24 | case 5:
25 | $('#pass-strength-result').addClass('short').html( pwsL10n.mismatch );
26 | break;
27 | default:
28 | $('#pass-strength-result').addClass('short').html( pwsL10n['short'] );
29 | }
30 | }
31 |
32 | $(document).ready( function() {
33 | $('#pass1').val('').keyup( check_pass_strength );
34 | $('#pass2').val('').keyup( check_pass_strength );
35 | $('#pass-strength-result').show();
36 | });
37 | })(jQuery);
38 |
39 | /* global zxcvbn */
40 | window.dcrm = window.dcrm || {};
41 | var passwordStrength;
42 | (function($){
43 | dcrm.passwordStrength = {
44 | /**
45 | * Determine the strength of a given password
46 | *
47 | * @param string password1 The password
48 | * @param array blacklist An array of words that will lower the entropy of the password
49 | * @param string password2 The confirmed password
50 | */
51 | meter : function( password1, blacklist, password2 ) {
52 | if ( ! $.isArray( blacklist ) )
53 | blacklist = [ blacklist.toString() ];
54 |
55 | if (password1 != password2 && password2 && password2.length > 0)
56 | return 5;
57 |
58 | var result = zxcvbn( password1, blacklist );
59 | return result.score;
60 | },
61 |
62 | /**
63 | * Builds an array of data that should be penalized, because it would lower the entropy of a password if it were used
64 | *
65 | * @return array The array of data to be blacklisted
66 | */
67 | userInputBlacklist : function() {
68 | var i, userInputFieldsLength, rawValuesLength, currentField,
69 | rawValues = [],
70 | blacklist = [],
71 | userInputFields = [ 'web_title', 'user_login', 'display_name', 'email', 'url', 'description', 'admin_email' ];
72 |
73 | // Collect all the strings we want to blacklist
74 | rawValues.push( document.title );
75 | rawValues.push( document.URL );
76 |
77 | userInputFieldsLength = userInputFields.length;
78 | for ( i = 0; i < userInputFieldsLength; i++ ) {
79 | currentField = $( '#' + userInputFields[ i ] );
80 |
81 | if ( 0 === currentField.length ) {
82 | continue;
83 | }
84 |
85 | rawValues.push( currentField[0].defaultValue );
86 | rawValues.push( currentField.val() );
87 | }
88 |
89 | // Strip out non-alphanumeric characters and convert each word to an individual entry
90 | rawValuesLength = rawValues.length;
91 | for ( i = 0; i < rawValuesLength; i++ ) {
92 | if ( rawValues[ i ] ) {
93 | blacklist = blacklist.concat( rawValues[ i ].replace( /\W/g, ' ' ).split( ' ' ) );
94 | }
95 | }
96 |
97 | // Remove empty values, short words, and duplicates. Short words are likely to cause many false positives.
98 | blacklist = $.grep( blacklist, function( value, key ) {
99 | if ( '' === value || 4 > value.length ) {
100 | return false;
101 | }
102 |
103 | return $.inArray( value, blacklist ) === key;
104 | });
105 |
106 | return blacklist;
107 | }
108 | };
109 |
110 | // Backwards compatibility.
111 | passwordStrength = dcrm.passwordStrength.meter;
112 | })(jQuery);
--------------------------------------------------------------------------------
/main/js/password-strength.min.js:
--------------------------------------------------------------------------------
1 | /* global ajaxurl, pwsL10n */
2 | (function($){function check_pass_strength(){var pass1=$('#pass1').val(),pass2=$('#pass2').val(),strength;$('#pass-strength-result').removeClass('short bad good strong');if(!pass1){$('#pass-strength-result').html(pwsL10n.empty);return}strength=dcrm.passwordStrength.meter(pass1,dcrm.passwordStrength.userInputBlacklist(),pass2);switch(strength){case 2:$('#pass-strength-result').addClass('bad').html(pwsL10n.bad);break;case 3:$('#pass-strength-result').addClass('good').html(pwsL10n.good);break;case 4:$('#pass-strength-result').addClass('strong').html(pwsL10n.strong);break;case 5:$('#pass-strength-result').addClass('short').html(pwsL10n.mismatch);break;default:$('#pass-strength-result').addClass('short').html(pwsL10n['short'])}}$(document).ready(function(){$('#pass1').val('').keyup(check_pass_strength);$('#pass2').val('').keyup(check_pass_strength);$('#pass-strength-result').show()})})(jQuery);
3 | /* global zxcvbn */
4 | window.dcrm=window.dcrm||{};var passwordStrength;(function($){dcrm.passwordStrength={meter:function(password1,blacklist,password2){if(!$.isArray(blacklist))blacklist=[blacklist.toString()];if(password1!=password2&&password2&&password2.length>0)return 5;var result=zxcvbn(password1,blacklist);return result.score},userInputBlacklist:function(){var i,userInputFieldsLength,rawValuesLength,currentField,rawValues=[],blacklist=[],userInputFields=['web_title','user_login','display_name','email','url','description','admin_email'];rawValues.push(document.title);rawValues.push(document.URL);userInputFieldsLength=userInputFields.length;for(i=0;ivalue.length){return false}return $.inArray(value,blacklist)===key});return blacklist}};passwordStrength=dcrm.passwordStrength.meter})(jQuery);
--------------------------------------------------------------------------------
/main/js/zxcvbn-async.min.js:
--------------------------------------------------------------------------------
1 | (function(){var a=function(){var a,b;return b=document.createElement("script"),b.src=_zxcvbnSettings.src,b.type="text/javascript",b.async=!0,a=document.getElementsByTagName("script")[0],a.parentNode.insertBefore(b,a)};null!=window.attachEvent?window.attachEvent("onload",a):window.addEventListener("load",a,!1)}).call(this);
--------------------------------------------------------------------------------
/main/lists.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | $_customct = true;
22 | require_once('system/common.inc.php');
23 |
24 | if (!empty($_GET['request']) AND (!empty($_SERVER['HTTP_X_UNIQUE_ID']) OR DCRM_DIRECT_DOWN == 1)) {
25 | $lastip = DB::fetch_first("SELECT `IP` FROM `".DCRM_CON_PREFIX."UDID` WHERE `UDID` = '".$_SERVER['HTTP_X_UNIQUE_ID']."'");
26 | $nowip = _ip2long(getIp());
27 | if(!empty($lastip) && $lastip['IP'] != $nowip)
28 | DB::update(DCRM_CON_PREFIX.'UDID', array('IP' => $nowip), array('UDID' => $_SERVER['HTTP_X_UNIQUE_ID']));
29 | $r_path = $_GET['request'];
30 | $list_text = array('Release', 'Release.gpg', 'Packages', 'Packages.gz', 'Packages.bz2');
31 | if (in_array($r_path, $list_text)) {
32 | if (file_exists($r_path)) {
33 | downFile($r_path, $r_path);
34 | } else {
35 | httpinfo(404);
36 | }
37 | } else {
38 | httpinfo(405);
39 | }
40 | } else {
41 | httpinfo(400);
42 | }
43 | ?>
44 |
--------------------------------------------------------------------------------
/main/manage/about.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | session_start();
22 | define("DCRM",true);
23 | $activeid = 'about';
24 |
25 | if (isset($_SESSION['connected']) && $_SESSION['connected'] === true) {
26 | require_once("header.php");
27 |
28 | preg_match("#^([0-9]\.[0-9])\.([0-9.]*)#", VERSION, $versions);
29 | ?>
30 |
31 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/main/manage/css/animation-shake.css:
--------------------------------------------------------------------------------
1 | /* Animation - http://daneden.me/animate */
2 | .animation{visibility:hidden}
3 | .animation.delay{-webkit-animation-delay:1.5s;-o-animation-delay:1.5s;animation-delay:1.5s}
4 | .animation.infinite{-webkit-animation-iteration-count:infinite;-o-animation-iteration-count:infinite;animation-iteration-count:infinite}
5 | .animation.animating{visibility:visible;-webkit-animation-duration:800ms;-o-animation-duration:800ms;animation-duration:800ms;-webkit-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}
6 | .animation.animated{visibility:visible}
7 | .animation.hinge{-webkit-animation-duration:2s;-o-animation-duration:2s;animation-duration:2s}
8 | @-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}
9 | @-o-keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);-o-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);-o-transform:translateX(10px);transform:translateX(10px)}}
10 | @keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);-o-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);-o-transform:translateX(10px);transform:translateX(10px)}}
11 | .shake{-webkit-animation-name:shake;-o-animation-name:shake;animation-name:shake}
--------------------------------------------------------------------------------
/main/manage/css/bootstrap-rtl.min.css:
--------------------------------------------------------------------------------
1 | html{direction:rtl;}
2 | input{text-align:right;}
3 | .nav-list{text-align:right;}
4 | .wrap{text-align:right;margin: 0 2px 0 2px;}
5 | .form-horizontal .controls{margin-right:140px;padding-right:20px;margin-left: 0;padding-left: 0;}
6 | .row {margin-right: 60px;}
7 | #sidebar{float: right;}
8 | .content {margin-left: 0px; padding-left: 20px; margin-right: 100px; padding-right: 20px;}
9 | #logo{float: right;}
10 | .pull-right { float: left !important; }
11 | .btn-group .btn:first-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}
12 | .btn-group .btn {margin-right: -5px;margin-left: 0px;}
13 | .btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}
14 | .table th, .table td{text-align: right;}
15 | .btn-success{display:inline-block;}
16 | .navbar span{display:inline-block;}
17 | .subtitle h2{display:inline-block;}
18 | .wrapper > .item > span{display:inline-block;}
19 | @media only screen and (max-width:830px){
20 | .form-horizontal .control-label{position:static;width:auto;text-align:right;}
21 | .form-horizontal .controls{margin-right:0px;padding-right:0px}
22 | }
23 |
--------------------------------------------------------------------------------
/main/manage/css/corepage.css:
--------------------------------------------------------------------------------
1 | .ctl {text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding:2px}
2 | .page {font:16px}
3 | .page span{float:left;margin:0px 3px;}
4 | .page a{float:left;margin:0 3px;border:1px solid #ddd;padding:3px 7px;text-decoration:none;color:#666}
5 | .page a.now_page,#page a:hover{color:#fff;background:#0088cc}
--------------------------------------------------------------------------------
/main/manage/css/default.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlxg/WEIPDCRM/dbe88647f65dd018900117c179a280e747c3cd80/main/manage/css/default.ttf
--------------------------------------------------------------------------------
/main/manage/css/index.php:
--------------------------------------------------------------------------------
1 | li{font-size:12px;list-style:none;color:#ed5466}
7 | .parsley-error{border-color:#ed5466!important}
8 | .parsley-custom-error-message{color:#ed5466}
9 | /* checkbox + radio */
10 | .parsley-error.custom-checkbox>label:before,.parsley-error.custom-radio>label:before,.parsley-error.custom-checkbox:hover>label:before,.parsley-error.custom-radio:hover>label:before{border:1px solid #ed5466}
11 | .parsley-error.custom-checkbox>input[type="checkbox"]:checked+label:before,.parsley-error.custom-radio>input[type="checkbox"]:checked+label:before{border-color:#ed5466;background-color:#ed5466}
12 | .parsley-error.custom-checkbox>label,.parsley-error.custom-radio>label{color:#ed5466}
--------------------------------------------------------------------------------
/main/manage/hint.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | session_start();
22 | define('MANAGE_ROOT', dirname(__FILE__).'/');
23 | define('ABSPATH', dirname(MANAGE_ROOT).'/');
24 | require_once ABSPATH.'system/common.inc.php';
25 |
26 | if (isset($_SESSION['connected']) && $_SESSION['connected'] === true) {
27 | if (isset($_POST['action']) && $_POST['action'] == "adv_info") {
28 | $item_id = (int)$_POST['item'];
29 | $item_col = DB::real_escape_string($_POST['col']);
30 | if (empty($item_col) || $item_id == 0) {
31 | die("NULL");
32 | }
33 | $item = DB::fetch_first("SELECT * FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '" . $item_id . "'");
34 | if (empty($item[$item_col]) && $item[$item_col] !== '0') {
35 | die("NULL");
36 | } else {
37 | die($item[$item_col]);
38 | }
39 | } else {
40 | die("Invaild Operation.");
41 | }
42 | } else {
43 | die("Permission Denied.");
44 | }
45 | ?>
--------------------------------------------------------------------------------
/main/manage/index.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | session_start();
22 | define('MANAGE_ROOT', dirname(__FILE__).'/');
23 | define('ABSPATH', dirname(MANAGE_ROOT).'/');
24 | require_once ABSPATH.'system/common.inc.php';
25 |
26 | if (isset($_SESSION['connected']) && $_SESSION['connected'] === true) {
27 | header("Location: center.php");
28 | } else {
29 | header("Location: login.php");
30 | }
31 | exit();
32 | ?>
--------------------------------------------------------------------------------
/main/manage/javascript/backend/login.js:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * login.js
3 | * 页面: login.php
4 | * 插件使用: parsley
5 | * ======================================================================== */
6 |
7 | 'use strict';
8 |
9 | (function (factory) {
10 | if (typeof define === 'function' && define.amd) {
11 | define([
12 | 'parsley'
13 | ], factory);
14 | } else {
15 | factory();
16 | }
17 | }(function () {
18 |
19 | $(function () {
20 | // 登录表功能
21 | // ================================
22 | var $form = $('form[name=form-login]');
23 |
24 | // 点击提交按钮
25 | $form.on('click', 'button[type=submit]', function (e) {
26 | var $this = $(this);
27 |
28 | //运行parsley验证
29 | if ($form.parsley().validate()) {
30 | // 禁用提交按钮(Safari支持有问题?)
31 | //$this.prop('disabled', true);
32 |
33 | // start nprogress bar
34 | NProgress.start();
35 |
36 | // 你可以在此放入ajax
37 | setTimeout(function () {
38 | // done nprogress bar
39 | NProgress.done();
40 |
41 | // 提交表单
42 | $('form-login').submit();
43 | }, 500);
44 | } else {
45 | animation();
46 | }
47 | // prevent default
48 | e.preventDefault();
49 | });
50 | });
51 |
52 | }));
53 | function animation(){
54 | // 切换动画
55 | $('.panel')
56 | .removeClass('animation animating shake')
57 | .addClass('animation animating shake')
58 | .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
59 | $(this).removeClass('animation animating shake');
60 | });
61 | };
62 | // 选择语言后POST
63 | function set_language(){
64 | var selectedValue = $("select[name=language]").val();
65 | selectedValue = typeof selectedValue == "object" ? selectedValue[0] : selectedValue;
66 | $.post("login.php", {language: selectedValue}, function(){
67 | window.location.href = "login.php";
68 | });
69 | };
70 | // 粒子动画
71 | var particles_config = {
72 | "particles": {
73 | "number": {"value": 20, "density": {"enable": 1, "value_area": 1E3}},
74 | "color": {"value": "#e1e1e1"},
75 | "shape": {"type": "circle"},
76 | "opacity": {"value": 0.5, "random": 0, "anim": {"enable": 1,"speed": 0.5,"opacity_min": 0}},
77 | "size": {"value": 15, "random": 1, "anim": {"enable": 0}},
78 | "line_linked": {"enable": 1, "distance": 650, "color": "#cfcfcf", "opacity": 0.25, "width": 1},
79 | "move": {"enable": 1, "speed": 2, "random": 1, "direction": "none", "straight": 0, "out_mode": "out", "bounce": 0, "attract": {"enable": 0}}
80 | },
81 | "interactivity": {"detect_on": "canvas", "events": {"onhover": {"enable": 0}, "onclick": {"enable": 0}, "resize": 1},},
82 | "retina_detect": 1
83 | };
84 | ((0, window.$)("\x3cdiv\x3e", {id: "particles"}).appendTo("body"), window.particlesJS('particles', particles_config));
--------------------------------------------------------------------------------
/main/manage/javascript/backend/login.min.js:
--------------------------------------------------------------------------------
1 | "use strict";(function(factory){if(typeof define==="function"&&define.amd){define(["parsley"],factory)}else{factory()}}(function(){$(function(){var $form=$("form[name=form-login]");$form.on("click","button[type=submit]",function(e){var $this=$(this);if($form.parsley().validate()){NProgress.start();setTimeout(function(){NProgress.done();$("form-login").submit()},500)}else{animation()}e.preventDefault()})})}));function animation(){$(".panel").removeClass("animation animating shake").addClass("animation animating shake").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("animation animating shake")})}function set_language(){var selectedValue=$("select[name=language]").val();selectedValue=typeof selectedValue=="object"?selectedValue[0]:selectedValue;$.post("login.php",{language:selectedValue},function(){window.location.href="login.php"})}var particles_config={"particles":{"number":{"value":20,"density":{"enable":1,"value_area":1000}},"color":{"value":"#e1e1e1"},"shape":{"type":"circle"},"opacity":{"value":0.5,"random":0,"anim":{"enable":1,"speed":0.5,"opacity_min":0}},"size":{"value":15,"random":1,"anim":{"enable":0}},"line_linked":{"enable":1,"distance":650,"color":"#cfcfcf","opacity":0.25,"width":1},"move":{"enable":1,"speed":2,"random":1,"direction":"none","straight":0,"out_mode":"out","bounce":0,"attract":{"enable":0}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":0},"onclick":{"enable":0},"resize":1},},"retina_detect":1};((0,window.$)("\x3cdiv\x3e",{id:"particles"}).appendTo("body"),window.particlesJS("particles",particles_config));
--------------------------------------------------------------------------------
/main/manage/javascript/backend/mbar.js:
--------------------------------------------------------------------------------
1 | function getRadioBoxValue(radioName) {
2 | var obj = document.getElementsByName(radioName);
3 | for (i = 0; i < obj.length; i++) {
4 | if (obj[i].checked) {
5 | return obj[i].value;
6 | }
7 | }
8 | return "undefined";
9 | }
10 | function opt(r) {
11 | pid = getRadioBoxValue("package");
12 | if (pid != "undefined") {
13 | if (r == 1) {
14 | window.location.href = "view.php?id="+pid;
15 | } else if (r == 2) {
16 | window.location.href = "edit.php?id="+pid;
17 | } else if (r == 3) {
18 | window.location.href = "edit.php?action=advance&id="+pid;
19 | } else if (r == 4) {
20 | if(confirm(hide_text)){
21 | window.location.href = "center.php?action=submit&id="+pid;
22 | }
23 | } else if (r == 5) {
24 | if(confirm(show_text)){
25 | window.location.href = "center.php?action=submit&id="+pid;
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/main/manage/javascript/backend/misc.js:
--------------------------------------------------------------------------------
1 | function wrapper(triangleitem, item) {
2 | var triangle = document.getElementById(triangleitem);
3 | var elementitem = $("#"+item);
4 | if (elementitem.css("display")=="none") {
5 | triangle.style.mozTransform = "rotate(0deg)";
6 | triangle.style.webkitTransform = "rotate(0deg)";
7 | triangle.style.oTransform = "rotate(0deg)";
8 | triangle.style.transform = "rotate(0deg)";
9 | elementitem.slideDown(300);
10 | } else {
11 | elementitem.slideUp(300);
12 | triangle.style.mozTransform = "rotate(-90deg)";
13 | triangle.style.webkitTransform = "rotate(-90deg)";
14 | triangle.style.oTransform = "rotate(-90deg)";
15 | triangle.style.transform = "rotate(-90deg)";
16 | }
17 | }
--------------------------------------------------------------------------------
/main/manage/manage.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | session_start();
22 | define("DCRM",true);
23 | $activeid = 'manage';
24 |
25 | if (isset($_SESSION['connected']) && $_SESSION['connected'] === true) {
26 | require_once("header.php");
27 |
28 | if (!isset($_GET['action'])) {
29 | ?>
30 |
31 |
32 |
42 |
43 |
44 |
45 |
46 |
50 |
51 |
52 | |
53 | |
54 | |
55 | |
56 |
57 |
62 |
63 | × |
64 | ≡ |
65 | |
66 | |
67 |
68 |
71 |
72 |
76 |
77 |
78 |
79 |
100 |
103 |
104 |
105 |
106 |
114 |
115 |
116 |
117 |
118 |
122 |
123 |
124 |
125 |
126 |
129 |
130 |
131 |
132 |
133 |
143 |