Zinim [MySQLi][PHP][CMS]

Status
Not open for further replies.

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
I clarified above that I meant it would be possible to get shelled if you used bad practices like that. I didn't literally mean that script would get him shelled.
What bad practices? From what I can see all the variables are (And should be) included from a configuration page.
Sounds like you just threw out a judgement to sound like you knew what you where talking about.
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,396
960
What. The. Fuck. Do. You. Mean.

Also, the bad practice of using a if/else block for that purpose. I find it easier, neater, and much more efficient to use switch().
Do you have any performance benchmarks that show using switch() is "much more efficient"?

It's not bad practice to use if/else. It's called preference.
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,396
960
I said for the purpose he did. It will be much better if he used switch(). Regardless, idgaf. Stop spamming.
Explain how it would be much better if he used switch(). You are making assertions that you have yet to back up. Questioning such claims is not spamming. I also like how disregarded the portion of my post asking you to show how using switch() is "much more efficient" than using if/else.

Here is an actual benchmark running the same code for if/else and switch() through 100k iterations:


In each test, if/else was always quicker.
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,396
960
You win, I guess? Want a fucking cookie?
I find it sad that you think me questioning some of your wild claims is the equivalent of a win/lose type situation. Finding out you were wrong about something shouldn't be considered a 'loss'. Unless, of course, you have an insecure ego.
 

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
Enough of the spam.

The install folder will have to be deleted after installation so no protection on it is required. I did state the code would be cleaned up. Also, if you read I said I've recoded it so it doesn't even have a mysqli class yet (need to update thread). Support this project or not, I don't give a shite,
 

Jian

Resident Weeb
Contributor
Sep 2, 2011
687
437
Where did my edited post go?:S oh and also, if you read, I gave you credits.

I did say I was using CodeTana. You lot can't even give me a chance without throwing your judgements around. Also, isn't CodeTana opensource anyway? Lol. 


If you can read and understand things, you'll of had the impression that I'm not trying to beat him, also, why should I recode what's already there for me to use? 


My mistake, sorry.
You didn't say you were using Codetana, and Codetana is indeed open-sourced. But the license says no 100% of ripped code.
 

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
You must find pride in being a troll.

take a look at mine:
PHP:
<?php
/*------------------------------------------------------------------------------------o
| o---------------------------------------------------------------------------------o |
| | ConforMS - The CMS that adjusts to all skill levels                            | |
| | Copyright (C) 2013 Jacob                                              | |
| o---------------------------------------------------------------------------------o |
| |  Permission is hereby granted, free of charge, to any person obtaining a copy  | |
| |  of this software and associated documentation files (the "Software"), to deal  | |
| |  in the Software without restriction, including without limitation the rights  | |
| |  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell      | |
| |  copies of the Software, and to permit persons to whom the Software is          | |
| |  furnished to do so, subject to the following conditions:                      | |
| o---------------------------------------------------------------------------------o |                                                                             
| |  The above copyright notice and this permission notice shall be included in    | |
| |  all copies or substantial portions of the Software.                            | |
| o---------------------------------------------------------------------------------o |
| |  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR    | |
| |  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,      | |
| |  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE    | |
| |  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER        | |
| |  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  | |
| |  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN      | |
| |  THE SOFTWARE.                                                                  | |
| o---------------------------------------------------------------------------------o |
o------------------------------------------------------------------------------------*/
define('CONFORMS', 'INSTALL');
require('global.php');
 
$s = @clean($_GET['s']);
if(empty($s)) {
    $s = 1;
}
 
if(file_exists(R . DS . I . DS . 'install_lock'. P)) {
    die('Site already installed! You might wanna delete this file!');
}
else {
    if(is_numeric($s)) {
        switch($s) {
            case 1:
                $title = 'ConforMS Installation: Step 1';
                require_once(R . DS . I . DS . 'step1'. P);
            break;
 
            case 2:
                $title = 'ConforMS Installation: Step 2';
                if(isset($_SESSION['step_1'])) {
                    require_once(R . DS . I . DS . 'step2'. P);
                } else { header("Location: ?s=1"); }
            break;
 
            case 3:
            if(isset($_SESSION['step_2']) && isset($_SESSION['step_1'])) {
                $title = 'ConforMS Installation: Step 3';
                require_once(R . DS . I . DS . 'step3'. P);
            } else { header("Location: ?s=2"); }
            break;
        }
    } else {
        header("Location: ?s=1");
    }
}
?>

I don't need your code, I'd rather do it my own way.

You didn't say you were using Codetana, and Codetana is indeed open-sourced. But the license says no 100% of ripped code.

I did say in an edited post I was using CodeTana but I'm not sure where I went :S, secondly in the thread I included and gave chits to you. And finally, I've stated I'm recoding it so I haven't even got a MySQLi class yet. 
Are you stupid or what ?
The framework is what helps to make a cms if the author is new to web dev (not the right correct definition but it matches this situation), as it has all the classes, core files... So the author can grab it and study it and make it's own stuff from scratch, but in this case i think your just ripping it off.
So, 's point is totally valid dude.

No. I don't think you understand what I'm saying. This isnt a framework, it's a CMS, so if I "rip" all of CodeTana, it'd be a framework not a CMS, I hope you simpletons will now understand.
 

LeCeejay

Member
Dec 25, 2010
122
17
Joshua, not being funny - and this may be a bit off topic for the first point, but for a guy who's trying to regain respect, as you said, calling people simpletons isn't the way to go about it, the way I see it is their giving their opinion, stop being so harsh on them and learn to take some criticism, orelse you'll just get annoyed at every bit of criticism.

Ontopic: Good luck, and I hope this goes well for you.
 

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
Joshua, not being funny - and this may be a bit off topic for the first point, but for a guy who's trying to regain respect, as you said, calling people simpletons isn't the way to go about it, the way I see it is their giving their opinion, stop being so harsh on them and learn to take some criticism, orelse you'll just get annoyed at every bit of criticism.

Ontopic: Good luck, and I hope this goes well for you.

My apologies to . I didn't intend to get so annoyed. You're completely right.
 

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
Apologie accepted.

On Topic: Good luck with this.

Thanks: :)

I've been cleaning the code up and adding a license in the files, here's my result:
PHP:
<?php
/*------------------------------------------------------------------------|
| Zinim - Copyright (c) Josh Priestley 2012                              |
| ------------------------------------------------------------------------|
| Permission is hereby granted, free of charge, to any person obtaining a |
| copy of this software and associated documentation files                |
| (the "Software"), to deal in the Software without restriction,          |
| including without limitation the rights to use, copy, modify, merge,    |
| publish, distribute, sublicense, and/or sell copies of the Software,    |
| and to permit persons to whom the Software is furnished to do so,      |
| subject to the following conditions:                                    |
| ------------------------------------------------------------------------|
| The above copyright notice and this permission notice shall be included |
| in all copies or substantial portions of the Software.                  |
| ------------------------------------------------------------------------|
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF              |
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  |
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY    |
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,    |
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      |
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                  |
| -----------------------------------------------------------------------*/
 
/*
* Allow file access
*/
define('IN_ZINIM_INSTALLER', true);
 
/*
* $_GET step
*/
if(!isset($_GET['s']) || $_GET['s'] != 1 && $_GET['s'] != 2 && $_GET['s'] != 3 && $_GET['s'] != 4) {
header('Location: ?s=1');
} else {
include('steps/' . $_GET['s'] . '.php');
}
 
 
?>

I think that i'll stay with my if/else rather than doing a switch case. Much easier in my eyes but it's all down to personal preference. Also, a proper scaled picture:
vRUtpc4.png


Next i'm intending on completing the installer and then i'll begin doing the classes.
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
Thanks: :)

I've been cleaning the code up and adding a license in the files, here's my result:
PHP:
<?php
/*------------------------------------------------------------------------|
| Zinim - Copyright (c) Josh Priestley 2012                              |
| ------------------------------------------------------------------------|
| Permission is hereby granted, free of charge, to any person obtaining a |
| copy of this software and associated documentation files                |
| (the "Software"), to deal in the Software without restriction,          |
| including without limitation the rights to use, copy, modify, merge,    |
| publish, distribute, sublicense, and/or sell copies of the Software,    |
| and to permit persons to whom the Software is furnished to do so,      |
| subject to the following conditions:                                    |
| ------------------------------------------------------------------------|
| The above copyright notice and this permission notice shall be included |
| in all copies or substantial portions of the Software.                  |
| ------------------------------------------------------------------------|
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF              |
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  |
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY    |
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,    |
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      |
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                  |
| -----------------------------------------------------------------------*/
 
/*
* Allow file access
*/
define('IN_ZINIM_INSTALLER', true);
 
/*
* $_GET step
*/
if(!isset($_GET['s']) || $_GET['s'] != 1 && $_GET['s'] != 2 && $_GET['s'] != 3 && $_GET['s'] != 4) {
header('Location: ?s=1');
} else {
include('steps/' . $_GET['s'] . '.php');
}
 
 
?>

I think that i'll stay with my if/else rather than doing a switch case. Much easier in my eyes but it's all down to personal preference. Also, a proper scaled picture:
vRUtpc4.png


Next i'm intending on completing the installer and then i'll begin doing the classes.
Where's the layout from?
 

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
Updates
- Added some placeholders to the MySQL configuration page, it was abit confusing for those who didn't know the default MySQL port etc.
- Added a functions.php file into the install folder which will control how the installation pages work
- Made a db.sql inside the install folder, which is where the database to be executed will be held
- The installer now uses $_SESSION[] to check if the user skipped a step
- The installer also now uses a the $mysqli->multi_query(); function to execute the db.sql file
- Error reporting in the installer is turned off so MySQLi connections wont error if they're wrong
- MySQL configuration in the installer is fully completed
- Errors also occur in the installer

Screens
b9gS4I9.png

xm2P8eN.png


Snippet
OWK1SFZ.png
 
Jan 17, 2012
649
166
Have you thought of using or ?
 

JoshuaLuke

Posting Freak
Jan 29, 2012
529
51
Have you thought of using or ?

I'm considering using Meekro, no promises though. I'd have to take a proper look at it first before I decide but from what i've seen, it looks pretty good.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
Thread closed due to lack of updates and OP being inactive.
 
Status
Not open for further replies.

Users who are viewing this thread

Top