This commit is contained in:
Li 2023-10-28 20:37:06 +13:00
parent 9b37ac6131
commit 15e444ed5f
16 changed files with 915 additions and 4 deletions

1
.gitingore Normal file
View File

@ -0,0 +1 @@
reference/*

55
LICENSE
View File

@ -1,7 +1,54 @@
This Program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
# 🏳️‍🌈 Opinionated Queer License v1.1
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 General Public License for more details.
© Copyright {Licensor}
You should have received a copy of the GNU General Public License along with this Program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
## Permissions
In addition, as a special exception, Red Hat, Inc. gives You the additional right to link the code of this Program with code not covered under the GNU General Public License ("Non-GPL Code") and to distribute linked combinations including the two, subject to the limitations in this paragraph. Non-GPL Code permitted under this exception must only link to the code of this Program through those well defined interfaces identified in the file named EXCEPTION found in the source code files (the "Approved Interfaces"). The files of Non-GPL Code may instantiate templates or use macros or inline functions from the Approved Interfaces without causing the resulting work to be covered by the GNU General Public License. Only Red Hat, Inc. may make changes or additions to the list of Approved Interfaces. You must obey the GNU General Public License in all respects for all of the Program code and other code used in conjunction with the Program except the Non-GPL Code covered by this exception. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to provide this exception without modification, you must delete this exception statement from your version and license this file solely under the GPL without exception.
The creators of this Work (“The Licensor”) grant permission
to any person, group or legal entity that doesn't violate the prohibitions below (“The User”),
to do everything with this Work that would otherwise infringe their copyright or any patent claims,
subject to the following conditions:
## Obligations
The User must give appropriate credit to the Licensor,
provide a copy of this license or a (clickable, if the medium allows) link to
[oql.avris.it/license/v1.1](https://oql.avris.it/license/v1.1),
and indicate whether and what kind of changes were made.
The User may do so in any reasonable manner,
but not in any way that suggests the Licensor endorses the User or their use.
## Prohibitions
No one may use this Work for prejudiced or bigoted purposes, including but not limited to:
racism, xenophobia, queerphobia, queer exclusionism, homophobia, transphobia, enbyphobia, misogyny.
No one may use this Work to inflict or facilitate violence or abuse of human rights as defined in the
[Universal Declaration of Human Rights](https://www.un.org/en/about-us/universal-declaration-of-human-rights).
No law enforcement, carceral institutions, immigration enforcement entities, military entities or military contractors
may use the Work for any reason. This also applies to any individuals employed by those entities.
No business entity where the ratio of pay (salaried, freelance, stocks, or other benefits)
between the highest and lowest individual in the entity is greater than 50 : 1
may use the Work for any reason.
No private business run for profit with more than a thousand employees
may use the Work for any reason.
Unless the User has made substantial changes to the Work,
or uses it only as a part of a new work (eg. as a library, as a part of an anthology, etc.),
they are prohibited from selling the Work.
That prohibition includes processing the Work with machine learning models.
## Sanctions
If the Licensor notifies the User that they have not complied with the rules of the license,
they can keep their license by complying within 30 days after the notice.
If they do not do so, their license ends immediately.
## Warranty
This Work is provided “as is”, without warranty of any kind, express or implied.
The Licensor will not be liable to anyone for any damages related to the Work or this license,
under any kind of legal claim as far as the law allows.

5
consts.php Normal file
View File

@ -0,0 +1,5 @@
<?php
define('SITE_NAME', "Systems.Page");
?>

3
css.php Normal file
View File

@ -0,0 +1,3 @@
<link rel="stylesheet" type="text/css" href="/css/head.css">
<link rel="stylesheet" type="text/css" href="/css/foot.css">
<link rel="stylesheet" type="text/css" href="/css/global.css">

15
css/foot.css Normal file
View File

@ -0,0 +1,15 @@
.footer {
display: block;
font-weight: bold;
background-color: lightblue;
text-align: center;
width:100%;
position:absolute;
bottom: 0px;
}
.footer span {
padding-left: 5px;
padding-right: 5px;
}

21
css/global.css Normal file
View File

@ -0,0 +1,21 @@
a {
color: black;
text-decoration: none;
}
a:hover{
text-decoration: underline;
}
.heading {
font-size: 200%;
font-weight: bold;
}
.content {
margin-left: 30%;
margin-right: 30%;
font-size: 130%;
}

76
css/head.css Normal file
View File

@ -0,0 +1,76 @@
html, body {
margin: 0;
padding: 0;
}
.sitename #title {
display: table-cell;
vertical-align: middle;
color: black;
}
.sitename #image {
display: table-cell;
vertical-align: middle;
}
.sitename #image img{
float: left;
}
.sitename a {
display: table-row;
text-decoration: none;
}
.spacer {
display: table;
width: 100%;
float: right;
}
.sitename {
display: table;
font-weight: bold;
float: left;
padding-left: 20px;
padding-right: 20px;
}
.sitename:hover{
background-color: #d8ebf3;
}
.navbar {
display: table;
font-weight: bold;
float: right;
}
.navbar a {
display: table-row;
text-decoration: none;
}
.navbar #entry {
padding-left: 20px;
padding-right: 20px;
display: table-cell;
vertical-align: middle;
color: black;
}
.navbar #entry:hover{
background-color: #d8ebf3;
}
.header {
display: flex;
font-size: 200%;
font-weight: bold;
color: white;
margin: 0px;
background-color: lightblue;
}

11
foot.php Normal file
View File

@ -0,0 +1,11 @@
</div>
<div class="footer">
<span id="notice">The Crystal System</span>
<span id="seperator">|</span>
<span id="copyright"><a href="https://oql.avris.it/license/v1.1">Licensed under the OQL</a></span>
</div>
</body>
</html>

57
head.php Normal file
View File

@ -0,0 +1,57 @@
<?php include("consts.php"); ?>
<!DOCTYPE HTML>
<html>
<head>
<!-- Eli, Sophie, Li, !-->
<?php include("css.php"); ?>
<meta name="title" content="<?php echo(SITE_NAME); ?>">
<meta name="description" content="">
<meta name="keywords" content="plural,system,plurality,osdd,did,cdd,tulpa,tulpamancy,headmate">
<meta name="robots" content="index, follow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="English">
<meta name="author" content="The Crystal System">
<meta property="og:title" content="<?php echo(SITE_NAME); ?>" />
<meta property="og:description" content="" />
<meta property="og:image" content=""/>
<title><?php echo(SITE_NAME); ?></title>
<meta name="viewport" content="width=1000; user-scalable=0;" />
</head>
<body>
<div class="header">
<div class="sitename">
<a href="/" >
<div id="image">
<img src="img/logo.png" alt="<?php echo(SITE_NAME); ?>" width="64" height="128">
</div>
<span id="title">
<?php echo(SITE_NAME); ?>
</span>
</a>
</div>
<div class="spacer">
</div>
<div class="navbar">
<a href="/login.php"> <div id="entry">Login</div> </a>
</div>
<?php
?>
</div>
<div class="content">

BIN
img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

23
index.php Normal file
View File

@ -0,0 +1,23 @@
<?php include("head.php"); ?>
<span class="heading">
<p>Welcome to <?php echo(SITE_NAME); ?>!</p>
</span>
<span id="info">
<p>We're creating a place for plural systems to share their headmates.</p>
</span>
<hr>
<span class="heading">
<p>What is a plural system anyway?</p>
</span>
<span id="info">
<p>Being a plural system means you are a person who shares a body with other people, the group people is called a 'system'.</p>
<p>People in a system have entirely different personalities, interests, likes, dislikes, gender, sexual orientation, etc.</p>
</span>
<?php include("foot.php"); ?>

31
lib/sql.php Normal file
View File

@ -0,0 +1,31 @@
<?php
include("sqlcfg.php");
function createTables($db) {
mysql_query($db, "CREATE TABLE IF NOT EXISTS Users(Id INT NOT NULL AUTO_INCREMENT, Username TEXT, PasswordHash TEXT, PRIMARY KEY(Id))");
mysql_query($db, "CREATE TABLE IF NOT EXISTS Systems(Id INT NOT NULL AUTO_INCREMENT, IsPluralSystem BOOL, SubSystem INT, UserCreated INT, PRIMARY KEY(Id))");
mysql_query($db, "CREATE TABLE IF NOT EXISTS Members(Id INT NOT NULL AUTO_INCREMENT, FromSystem INT, PRIMARY KEY(Id))");
}
function connect(){
$conn = new mysqli(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD, MYSQL_DATABASE);
if ($conn->connect_error) {
echo("<b>connection to mysql database failed.</b>");
exit();
}
createTables($conn);
return $conn;
}
?>

11
lib/sqlcfg.php Normal file
View File

@ -0,0 +1,11 @@
<?php
define("MYSQL_HOST", "127.0.0.1");
define("MYSQL_PORT", 3306);
define("MYSQL_USERNAME", "systemspage");
define("MYSQL_PASSWORD", "test123");
define("MYSQL_DATABASE", "pluralsystemsapp");
?>

19
login.php Normal file
View File

@ -0,0 +1,19 @@
<?php include("head.php"); ?>
<span class="heading">
<p>Login</p>
</span>
<span class="info">
<p>Enter your username and password:</p>
</span>
<div class="info">
<form action="login.php" method="post">
<p><input type="text" name="name" placeholder="Username"/></p>
<p><input type="password" name="password" placeholder="Password"/></p>
<p><input type="submit"/></p>
</form>
</div>
<?php include("foot.php"); ?>

84
reference/header.php Normal file
View File

@ -0,0 +1,84 @@
<!DOCTYPE HTML>
<?php
include("common.php");
update_csv();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="common.js"></script>
<?php
if(isset($_GET["id"]))
{
$CbpsCsv = explode("\n",file_get_contents("cbpsdb.csv"));
foreach($CbpsCsv as &$Entry){
$csv = explode(",",$Entry);
if(strcmp($csv[ID],$_GET["id"]) == 0)
{
$DEFAULT_ICON0 = $csv[DOWNLOAD_ICON0];
if(strcmp($csv[DOWNLOAD_ICON0],"None") == 0)
{
if($plugins == false)
$DEFAULT_ICON0 = "/img/default.png";
}
$GLOBALS['desc'] = htmlspecialchars(file_get_contents(get_readme($csv)),ENT_QUOTES);
echo('<meta name="title" content="CbpsDB - '.htmlspecialchars($csv[TITLE]).'">');
echo('<meta name="description" content="'.$GLOBALS['desc'].'">');
echo('<meta property="og:image" content="'.htmlspecialchars($DEFAULT_ICON0,ENT_QUOTES).'"/>');
echo('<meta name="twitter:image" content="'.htmlspecialchars($DEFAULT_ICON0,ENT_QUOTES).'"/>');
echo('<meta property="og:title" content="CbpsDB - '.htmlspecialchars($csv[TITLE]).'">');
echo('<meta property="og:description" content="'.$GLOBALS['desc'].'">');
echo('<meta name="keywords" content="Vita,Db,CBPS,CbpsDb,Vitadb,homebrew,henkaku,plugins,VPK,SKPRX,VPK">
<meta name="robots" content="index, follow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="English">
<meta name="author" content="SilicaAndPina">');
echo('<title>CbpsDB - '.htmlspecialchars($csv[TITLE]).'</title>');
}
}
}
else
{
echo('<meta name="title" content="CbpsDB - Ultimate source for PS Vita Homebrew apps and Plugins!">
<meta name="description" content="CbpsDB is the ultimate source for PS Vita Homebrew, Download all the latest PSVita homebrew plugins and apps!">
<meta name="keywords" content="Vita,Db,CBPS,CbpsDb,Vitadb,homebrew,henkaku,plugins,VPK,SKPRX,VPK">
<meta name="robots" content="index, follow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="English">
<meta name="author" content="SilicaAndPina">
<meta property="og:title" content="CbpsDB - Ultimate source for PS Vita Homebrew apps and Plugins!" />
<meta property="og:description" content="CbpsDB is the ultimate source for PS Vita Homebrew, Download all the latest PSVita homebrew plugins and apps!" />
<meta property="og:image" content="/img/logo.png"/>
<title>CbpsDB - Ultimate source for PS Vita Homebrew apps and Plugins!</title>');
}
?>
<meta name="viewport" content="width=1000; user-scalable=0;" />
</head>
<body>
<div class="header">
<div class="sitename">
<a href="/" class="image">
<img src="img/logo.png" alt="cbpsDB" width="50" height="50">
</a>
CbpsDB
</div>
<div class="sitemap">
<div id="apps_page" onclick='open_url("/")' class="sitemap-entry"><a href="/">Apps</a></div>
<div id="plugins_page" onclick='open_url("/plugins.php")' class="sitemap-entry"><a href="/plugins.php">Plugins</a></div>
<div id="submit_page" onclick='open_url("/submit.php")' class="sitemap-entry"><a href="/submit.php">Submit</a></div>
</div>
</div>

507
reference/style.css Normal file
View File

@ -0,0 +1,507 @@
/*
* header.php
*/
.sitename img {
vertical-align: top;
}
.sitename{
font-weight: bold;
float: left;
}
.sitemap{
position: relative;
float:right;
height: 100%;
margin: 0;
line-height: 120%;
font-weight: bold;
}
.sitemap-entry{
position:relative;
top: 0px;
color:#ffffff;
display: inline-block;
text-decoration:none;
padding: 0px 13px;
height: 100%;
}
.sitemap-entry a{
color: white;
text-decoration: none;
cursor: pointer;
}
.sitemap-entry:hover{
color: white;
background-image: linear-gradient(#30434a, #19262b);
text-decoration: none;
cursor: pointer;
}
.header {
font-size: 200%;
font-weight: bold;
color: white;
height: 50px;
width: 100%;
margin: 0px;
background-image: linear-gradient(#4e7280, #30434a);
}
/*
* submit.php
*/
.submit-tos{
color: white;
font-size: 70%;
text-align: left;
float: left;
}
.submit-box{
margin:10px;
top:50px;
width: 800px;
border: 1px solid #8d9fba;
height: 430px;
background-image: linear-gradient(#566d8f, #2c384a);
display: inline-block;
text-align: center;
position: relative;
}
.submit-form{
display:none;
}
.submit-action-icon{
position: relative;
top:20px;
text-align:center;
width:100%;
height:145px;
}
.submit-button{
position:relative;
color: white;
padding: 10px;
display: inline-block;
background-image: linear-gradient(#2f3d52, #141c29);
border: 1px solid #08101c;
box-sizing: border-box;
}
.submit-inputs{
position: relative;
top:20px;
text-align: center;
color: white;
font-weight: bold;
}
.submit-button:hover, .submit-button:disabled{
background-image: linear-gradient(#1a2638, #0b1017);
cursor:pointer;
}
.submit-textarea{
position:relative;
top: 0px;
vertical-align: top;
padding: 10px;
display: inline-block;
color: white;
border: 1px solid #08101c;
background-image: linear-gradient(#2f3d52, #141c29);
box-sizing: border-box;
resize: none;
}
.submit-captcha{
text-align: center;
}
.submit-progress-back{
position:relative;
display: inline-block;
height:30px;
width: 700px;
border: 1px solid #08101c;
background-image: linear-gradient(#2f3d52, #141c29);
}
.submit-progress-front{
position:relative;
top: 0px;
float: left;
display: inline-block;
height:100%;
width: 0px;
background-image: linear-gradient(#1a2638, #0b1017);
}
.g-recaptcha{
display: inline-block;
}
.submit-dropdown{
position:relative;
top: 0px;
padding: 10px;
display: inline-block;
color: white;
border: 1px solid #08101c;
background-image: linear-gradient(#2f3d52, #141c29);
box-sizing: border-box;
}
.submit-option{
position:relative;
margin:40px;
margin-top:30px;
width:200px;
height:350px;
background-image: linear-gradient(#2f3d52, #141c29);
display: inline-block;
border: 1px solid #08101c;
vertical-align: top;
}
.submit-status{
position:relative;
top:70px;
}
.submit-option:hover{
background-image: linear-gradient(#1a2638, #0b1017);
cursor:pointer;
}
.submit-skip{
position:absolute;
bottom: 1px;
right: 1px;
}
/*
* index.php
*/
.applist{
text-align: center;
}
.version-select{
width:70px;
height:40px;
float:right;
}
.vita-app a:link, a:visited{
color: white;
font-weight: bold;
text-decoration: none;
}
.vita-src-download a:hover{
color: white;
font-weight: bold;
text-decoration: underline;
}
.vita-app-icon{
position: absolute;
top:2px;
left:0px;
text-align:center;
width:100%;
height:145px;
}
.vita-app-info{
position: absolute;
text-align: center;
width: 95%;
height: 70px;
top:150px;
}
.vita-app-page{
margin:20px;
margin-bottom:20px;
width: 85%;
border: 1px solid #8d9fba;
background-image: linear-gradient(#566d8f, #2c384a);
display: inline-block;
text-align: center;
position: relative;
overflow: hidden;
}
.vita-app-page-title{
position:relative;
top:55px;
font-size:200%;
}
.vita-entry-info{
position:relative;
margin-top:100px;
width: 100%;
text-align: center;
}
.vita-app-page-readme{
margin-left: 0px;
margin: 10px;
text-align:left;
position:relative;
width:98%;
background-image: linear-gradient(#2f3d52, #141c29);
border: 1px solid #08101c;
vertical-align: top;
white-space: nowrap;
overflow: hidden;
}
.vita-app-page a:link, a:visited{
color: white;
font-weight: bold;
text-decoration: none;
}
.vita-app-page-readme a:link, a:visited{
color: white;
font-weight: bold;
text-decoration: underline;
}
.vita-app-page-icon{
margin:10px;
float: left;
}
.vita-app{
padding: 5px;
width: 200px;
height: 250px;
margin: 10px;
background-image: linear-gradient(#566d8f, #2c384a);
color: white;
text-align: left;
display: inline-block;
border: 1px solid #8d9fba;
vertical-align: middle;
position: relative;
white-space: nowrap;
overflow: hidden;
}
.vita-app:hover{
background-image: linear-gradient(#2f3d52, #141c29);
cursor: pointer;
}
.to-bottom{
position: absolute;
right:4px;
bottom: 2px;
}
.to-top{
position: absolute;
right:4px;
top: 2px;
}
.quick-download-area{
text-align: center;
}
.download-button:hover{
background-image: linear-gradient(#1a2638, #0b1017);
}
.download-button{
font-size: 80%;
border: 1px solid #08101c;
padding: 5px;
text-align:center;
background-image: linear-gradient(#2f3d52, #141c29);
margin:5px;
}
.vita-src-download{
font-size: 55%;
width: 200px;
text-align: right;
overflow: hidden;
}
/*
* devtools.php
*/
.devtoollist{
position: inherit;
margin-left: 15%;
margin-right: 15%;
text-align:center;
}
.devtool{
padding:10px;
margin: 10px;
width: 325px;
border-radius: 1000px;
background-color: #00ffa9;
display: inline-block;
vertical-align: middle;
}
.devtool:link, .devtool:visited, .devtool a{
text-decoration: none !important;
color: black;
/*font-size: 150%;*/
font-size: 25px;
font-weight: bold;
height:128px;
line-height: 120px;
}
.devtool:hover{
padding:10px;
margin: 10px;
width:325px;
height:128px;
border-radius: 1000px;
background-color: #005796;
cursor: pointer;
display: inline-block;
vertical-align: middle;
}
.devtool #textContent{
text-align: center;
}
.bubble-overlay{
position: absolute;
bottom: -1;
}
.bubble{
border-radius: 100%;
background-color: green;
}
/*
* Common
*/
html,body,header {
margin: 0;
padding: 0;
background-image: linear-gradient(#1e2226, #000000);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
color:white;
}
option{
color:black;
}
a.image{
text-decoration: none;
}
.mid{
vertical-align: middle;
}
.left{
float: left;
}
.black:link, .black:visited, .black{
color: black;
font-weight: bold;
text-decoration: none;
}
.black:hover{
color: black;
font-weight: bold;
text-decoration: underline;
}
.white:link, .white:visited, .white{
color: white;
font-weight: bold;
text-decoration: none;
cursor: pointer;
}
.white:hover{
color: white;
font-weight: bold;
text-decoration: underline;
cursor: pointer;
}
.nostyle:link, .nostyle:visited, .nostyle:hover, .nostyle, .nostyle a{
color: white;
font-weight: bold;
text-decoration: none !important;
cursor: pointer;
}
.button-enabled{
width: 300px;
height: 50px;
margin: 10px;
background-color: #00d0ff;
text-align: center;
font-weight: bold;
line-height: 50px;
float: left;
color: white;
border-radius: 20px;
}
.button-enabled:hover{
width: 300px;
height: 50px;
margin: 10px;
background-color: #005796;
text-align: center;
font-weight: bold;
line-height: 50px;
float: left;
cursor: pointer;
color: white;
border-radius: 20px;
}
.button-disabled{
width: 300px;
height: 50px;
margin: 10px;
background-color: #8f9db7;
text-align: center;
line-height: 50px;
float: left;
font-weight: bold;
color: #cfd2d3;
cursor: arrow;
border-radius: 20px;
}