26

(21 replies, posted in General discussion)

I thought that was the idea of it:
Show the admin interface but disable actual changes.

You will have to make a table with all th account numbers that's right.
You will end up there anyway one day, so I advise you to ad at least the basic client data.
Your table ACCOUNTS will contain the fields
ACT_ID
ACT_NO
ACT_CLIENTNAME
ACT_PRICELEVEL
..and so son
the last one you can use for your form.
The form field will have the name ACT_NO in this example.
So every time the form is submitted you do  a query like

$pr = $db->query("select ACT_PRICELEVEL from ACCOUNTS where ACT_NO=".intval($_REQUEST['ACT_NO']);
$ACT_PRICELEVEL = $db->result($pr);
Header("Location:pricelist_" . $ACT_PRICELEVEL . ".php");

Al you need to do is create pages by the names pricelist_1.php, pricelist_2.php and so on and set the valus 1,2, in the ACCOUNT-table for the corresponding account numbers.
Since I don't    know what db functions you use this assumes you take the ones from punbb.
Hope this gets you on the right tracks.
Mind you that for various reasons this method is not very safe; a "real" merchant system would do it totally differently.
But maybe for your purpose it's OK.

28

(21 replies, posted in General discussion)

Erm.. is ist not possible to change the db functions?

What you want is that if this function is called

$db->query('UPDATE....

then nothing should happen, right?

So, if you change your dblayer file (may be mysql.php or mysqli.php) you could do somethng similar to

       if(preg_match("/(UPDATE|DELETE|INSERT)/i",$sql) and preg_match("/admin/",$_SERVER['REQUEST_URI']))  return 1;

so that it looks like

    function query($sql, $unbuffered = false)
    {
      // CHANGED HERE.
       if(preg_match("/(UPDATE|DELETE|INSERT)/i",$sql) and preg_match("/admin/",$_SERVER['REQUEST_URI']))  return 1;
        if (defined('PUN_SHOW_QUERIES'))
            $q_start = get_microtime();

        $this->query_result = @mysqli_query($this->link_id, $sql);

You would then have a positive return value without anything happening to the database. but only if th URL contains "admin"
Or so I think, haven't tested. Maybe it's worth a try?

29

(114 replies, posted in Programming)

I'm extremely happy with Kate. It's Linux/KDE only though so I don't know if this is a big help for you.
It does dynamic line wrapping without destroying the indentation!
It has grat network  support, if you have ftp/ssh access you can open/save on remote machines. Along with the bookmarking system this makes life a lot easier if you have many sites to maintain.
It does mixed syntax highlighting for PHP/HTML as well, it has word completion (handy when you keep forgetting the name of that function you ust wrote.. smile )
For mouse junkies it has good drag&drop support as well.
It's pretty much like Ultraedit without the fee.
I believe it comes with most Linux live CDs featuring KDE so you can give it a try.

I use Dreamweaver on Windows and Zend Studio on Linux (I can't run that pile of java junk on Windows tongue). Dreamweaver really is great, as it has many good functions but isn't too bloated

What I don't like is that they're both very expensive.
Zend Studio is good though, I like the PHP function browser.
Dreamweaver has limits when you start separating your code from the HTML in a strict manner.

30

(68 replies, posted in PunBB 1.2 discussion)

pogenwurst wrote:

Or how about this:
Hot Captcha: http://www.hotcaptcha.com/
big_smile

Cool, but   it could keep people busy for hours.
Plus:
I just did 10 rounds on that  site and I failed only 3 times.
Is that good or bad?

31

(8 replies, posted in General discussion)

I really   like this part

along with 70 additional PHP scripts that every serious webmaster must have

I think somebody who needs this tool to install punBB needs a lot more before he should call himself a "webmaster" anyway.
A clue f.e. tongue

What will always keep me from using things like these is:
They give it fo free. So I ask myself - how do  they pay the traffic,  development costs, hosting?
Just Google Ads? Doesn't sound lik a business plan.
So either the will surprise their users one day  by switching to paid mode - or they sell the data that they collect.
Because this is the crucial point of all related systems: Your data is out of your control.
I may be paranoid but this I will not accept. I better stick with a notebook if I want to have access to my data anywhere i go smile

33

(8 replies, posted in General discussion)

I really like penisland.com .... I looked at the domain names first without reading the explanation,  trying to figure out myself what they could mean. Rather difficult with this one.. tongue

I do not see any  reason why   it should not work with 1.2.12
In fact it works on four installations of 1.2.12 that i run.

Just do what Pogenwurst said as for the update instructions... Iam sitting here, waiting for 1.3. to finally arrive and don't want to spent too much tim on 1.2.xxx moods anymore..... wink

plus, some people (like me) just love autocompleting  fields because they are too stupid to remember all their passwords....

36

(8 replies, posted in Feature requests)

If you are the server admin you can achieve this by working with  symlinks (httpd.conf -> FollowSymLinks).
The only original files that hav to exist on a per-user basis will be the templates (i.e. the layout) and the config file, all the rest is referenced from a central place.
This *should* work.
The drawback:
Of course this does not allow for mods on a per-user basis.

I tried it and it worked on my machine, I didn't follow the whole story to the end.
Currently all developments I planned are idling around... smile
I would hate to spend a lot  of time on something and then the next day 1.3 is coming out...

37

(2 replies, posted in General discussion)

You mean something like

<? echo $_SERVER['HTTP_REFERER'] ?>

?

38

(4 replies, posted in General discussion)

That looks perfect.
I'm just going nuts over some ajax/Javascript/css issues so this comes in reeeally handy smile

I haven't...
anyway, the thread is a bit outdated, I upgraded several times in between, so don't count on it to work properly anymore... smile

40

(2 replies, posted in Programming)

You are mixing up php and HTML a bit I think ...
why don't you create a nice looking form first, thn take that and incorporate it in your script?
That way you can preview it locally as well.

Dunno... I made this mod to see which users visit how often.
For the total of all visits you can refer to a normnal web stat analyzer like awstats or webalizer I think...

42

(8 replies, posted in General discussion)

It's really a pity that nowadays we all have to be so paranoid....'cause the idea is really funny.

43

(8 replies, posted in General discussion)

Reines wrote:

They have over 50,000 users so my guess is if it was a scam someone would have noticed by now.

The word that is irritating me here is "guess".
Anyway, I won't have a potential keylogger running to count my keystrokes while I do my online banking wink

So I will send them the amount of my daily keystroks and they have to take my word for it.

Don't get me wrong, most probably this is totally harmless, on the other hand - what if it's not? ....

44

(8 replies, posted in General discussion)

WhatPulse is not and never will be any sort of keylogger, it does not collect the keys you type, but only how many keys you type.

Do you compile this yourself to verify that it's not a keylogger or do you just believe it's not?

Just asking... tongue

45

(68 replies, posted in PunBB 1.2 discussion)

Let's see how things evolve.
Since this guy couldn't even develop a decent brain let alone a pice of software by himself he has no choice but go on stealing.
So he'll have to steal 1.3. again. That will keep him busy for a while tongue

46

(68 replies, posted in PunBB 1.2 discussion)

Oops.
There is my invitation mod...
This guy really rocks smile

chillnc wrote:

I'd like to receive an email every time that a user posts. Is there a setting that does that?

Right now I have to manually check the forum every day and see if I need to answer any posts.  thanks!

I wrote a mod a while ago exactly for this:
http://www.punres.org/files.php?pid=95

Have you tried to leave the SMTP server field blank to use your local mail server?

Paul wrote:
Tobi wrote:

Btw: Will we finally have penis enlargement in 1.3?

No but I suspect an extension will do the job for you (or her)

Good!
If you can help me with the installation that'd make me happy!

Do you think so?
I mean, after all mod_security is about static rules, regex thingies and such. So it will look for a very long list of keywords and find out how relevant they are. While spamassassin already comes with a database and has this bayesian filter so you could even *train* your board.
Don't get me wrong, I use and love mod_security but I think it's not the right thing for this job....