# looking for some creative thinking

**URL:** <https://www.phphelp.com/t/looking-for-some-creative-thinking/18906>\
**Category:** General PHP Help\
**Created:** [November 13, 2012, 10:53pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906 "2012-11-13T22:53:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 13, 2012, 10:53pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/1 "2012-11-13T22:53:41Z")

</div>

hello;

I’m using a script on my site called greybox located here [http://orangoo.com/labs/GreyBox/](http://orangoo.com/labs/GreyBox/)

I make links that popup nice boxes that are not blocked - the links look like this

makes a clickable link -

here’s what I’m trying to accomplish–

I want to use some php to look for certain credentials

if ($usercount \<= 5) {  
automatically popup a greybox  
}

problem with using window.open JS is that first off they are ugly and blockable

can anyone think of a way and be able to show me how I can achive this…

---

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 13, 2012, 11:34pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/2 "2012-11-13T23:34:57Z")

</div>

hmmm ok I found this and it works off the site but can’t seem to figure out how I can still use this but manage to control the location to center and the size of the frame like I do in the static links…

[php]if ($loggincount \<= 5) { ?\>

\<? } ?\>[/php]

---

<div class="post-metadata">

**Author:** ![m11](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@m11](https://www.phphelp.com/u/m11)\
**Post date:** [November 13, 2012, 11:59pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/3 "2012-11-13T23:59:51Z")

</div>

Using jQuery you could simply trigger the click on your anchor. For example

Assign an ID to your anchor, if needed:

```auto
<a id="myLog" href="logfile.php" title="VPC Logfile" rel="gb_page_center[690, 500]">
```

Trigger click on #myLog

[php]

\<?php if ($loggincount \<= 5) { ?\>

$(document).ready(function() {  
$(’#myLog’).trigger(‘click’);  
});

\<?php } ?\>

[/php]

---

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 14, 2012, 7:55pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/4 "2012-11-14T19:55:52Z")

</div>

Hey I was talking over with a buddy of mine and this was a conversation we had also was using java to automate a click - using your code when I loggin what happens is it seems to create the whole screen as a clickable item -

is there anything I can add or remove from that code for it to simply launch the popup if the conditions are met?

---

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 14, 2012, 8:00pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/5 "2012-11-14T20:00:20Z")

</div>

[php]  
if ($loggincount \<= 5) { ?\>

\<? } ?\>

[/php]

Like this here works perfect however don’t allow me to control any properties??

---

<div class="post-metadata">

**Author:** ![m11](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@m11](https://www.phphelp.com/u/m11)\
**Post date:** [November 14, 2012, 8:06pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/6 "2012-11-14T20:06:23Z")

</div>

> [@desjardins2012](#):
>
> using your code when I loggin what happens is it seems to create the whole screen as a clickable item -

I don’t understand. You want to trigger a click on a greybox item. That is all the code does. Here is a more complete example to trigger a click.

```auto
<html>
<head>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#myAnchor').click(function(e) {
			alert('Link was clicked!');
		});
		$('#myAnchor').trigger('click');
	});
	</script>
</head>
<body>
<a id="myAnchor" href="#">Click Me</a>
</body>
</html>
```

---

<div class="post-metadata">

**Author:** ![m11](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@m11](https://www.phphelp.com/u/m11)\
**Post date:** [November 14, 2012, 8:12pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/7 "2012-11-14T20:12:51Z")

</div>

> [@desjardins2012](#):
>
> what happens is it seems to create the whole screen as a clickable item

Did you close the anchor ()?? I only posted that code to show you that you would need to add an ID to the anchor.

---

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 14, 2012, 8:19pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/8 "2012-11-14T20:19:02Z")

</div>

Here is what I have

below the tag I have

```auto
<a id="myLog" href="logfile.php" title="VPC Logfile" rel="gb_page_center[690, 500]"></a>
```

and lower down

[php]if ($loggincount \<= 5) { ?\>

\<? } ?\>[/php]

Now when I added the tag now it does nothing??? what am I missing

---

<div class="post-metadata">

**Author:** ![m11](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@m11](https://www.phphelp.com/u/m11)\
**Post date:** [November 14, 2012, 8:30pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/9 "2012-11-14T20:30:50Z")

</div>

Did you include the jQuery library? Without seeing all the code I can’t say what the problem is.

---

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 14, 2012, 8:52pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/10 "2012-11-14T20:52:07Z")

</div>

[php]

\<?php session\_start(); if (!isset($\_SESSION['username'])) { echo "Sorry you must be logged in to view this page  
"; echo "Please GO BACK and try again"; exit(); } else { if ($\_SESSION['username']) { $username = $\_SESSION['username']; } } ?\> Heavens Hackers - Virtual Desktop Hacking Simulation \<?php

//make connect with server and select database  
//$connect = mysql\_connect(“localhost”,“heaven”,“jefF0614”) or die (“Could Not Connect To Server”);  
include (‘connect\_live.php’);  
mysql\_select\_db(‘heaven\_users’) or die (“Could Not Select Database”);  
//end

//query database  
$sql = mysql\_query(“SELECT \* FROM members WHERE username=’$username’”);

while ($result = mysql\_fetch\_assoc($sql)) {  
$loggincount = $result[‘userloggin’];  
$userip = long2ip($result[‘IPaddress’]);  
$player = $result[‘username’];  
$virus = $result[‘virusscanner’];  
$cracker = $result[‘passwordcracker’];  
$tracer = $result[‘iptracer’];  
$account = $result[‘bankaccountnumber’];  
$virusscanner = $result[‘virusscanner’];  
$passwordcracker = $result[‘passwordcracker’];  
$IP\_snooper = $result[‘IP\_snooper’];  
$IPseekPlus = $result[‘IPseekPlus’];  
$systemkey = $result[‘systemkey’];  
$register\_date = $result[‘register\_date’];  
$count\_crack = $result[‘count\_crack’];  
$userid = $result[‘id’];  
$reputationname = $result[‘reputationname’];

// $IP\_Monitor = $result[‘IP\_Monitor’];

$cash = $result[‘balance’];  
$exper = $result[‘exper’];  
$rep = $result[‘rep’];  
$level = $result[‘level’];  
$systemkey = $result[‘systemkey’];  
$cpuspeed = $result[‘cpuspeed’];  
$bounce1 = long2ip($result[‘bounceone’]);  
$bounce2 = long2ip($result[‘bouncetwo’]);  
$bounce3 = long2ip($result[‘bouncethree’]);  
}  
//set session varibles  
$\_SESSION[‘virusscanner’] = $virusscanner;  
$\_SESSION[‘passwordcracker’] = $passwordcracker;  
$\_SESSION[‘IP\_snooper’] = $IP\_snooper;  
$\_SESSION[‘IPseekPlus’] = $IPseekPlus;  
$\_SESSION[‘systemkey’] = $systemkey;  
$\_SESSION[‘register\_date’] = $register\_date;  
$\_SESSION[‘count\_crack’] = $count\_crack;

$\_SESSION[‘userlevel’] = $level;  
$\_SESSION[‘player’] = $player;  
$\_SESSION[‘cracker’] = $cracker;  
$\_SESSION[‘systemkey’] = $systemkey;  
$\_SESSION[‘cpuspeed’] = $cpuspeed;  
$\_SESSION[‘userip’] = $userip;  
$\_SESSION[‘exper’] = $exper;  
$\_SESSION[‘rep’] = $rep;

$\_SESSION[‘reputationname’] = $reputationname;  
$\_SESSION[‘account’] = $account;  
$\_SESSION[‘virus’] = $virus;  
$\_SESSION[‘balance’] = $cash;  
$\_SESSION[‘userid’] = $userid;  
// $\_SESSION[‘IP\_Monitor’] = $IP\_Monitor ;

//end session editing

//if users loggin count is below 5 loggins show the tutorial

if ($loggincount \<= 5) { ?\>

\<? } ?\>

```
</table>

```

| Welcome \<?php echo "$player"; ?\> |
| Available cash | \<?php $cash = number\_format($cash, 2, '.',','); echo "\$$cash"; ?\> |
| Experience | \<?php echo "$exper"?\> |
| Reputation | \<?php echo "$reputationname"?\> |
| Level | \<?php echo "$level"?\> |
| My IP | \<?php echo "$userip"?\> |
| Bank Number | \<?php echo "$account"?\> |
| Active Bounces |
| \<?php echo $bounce1." delete  
" .$bounce2." delete  
" .$bounce3." delete  
" ?\> |
| &nbsp; |

|  
My Computer
  |  
User Interface
  | | |
|
| |
|  
Programs
  |  
IP Database
  | | |
|
| |
|  
Finances
  |  
Email
  | | |
|
| |
|  
Internet
  |  
My Files
  | | |
|
| |
|  
LogFile
  | | | |
|
| |

 ![]()

[/php]

---

<div class="post-metadata">

**Author:** ![m11](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@m11](https://www.phphelp.com/u/m11)\
**Post date:** [November 14, 2012, 9:17pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/11 "2012-11-14T21:17:54Z")

</div>

Where are you including the jQuery library?

---

<div class="post-metadata">

**Author:** ![desjardins2012](https://www.phphelp.com/letter_avatar_proxy/v4/letter/d/a87d85/32.png) [@desjardins2012](https://www.phphelp.com/u/desjardins2012)\
**Post date:** [November 14, 2012, 9:25pm UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/12 "2012-11-14T21:25:13Z")

</div>

I dunno ☹

---

<div class="post-metadata">

**Author:** ![m11](https://www.phphelp.com/letter_avatar_proxy/v4/letter/m/85f322/32.png) [@m11](https://www.phphelp.com/u/m11)\
**Post date:** [November 15, 2012, 4:30am UTC](https://www.phphelp.com/t/looking-for-some-creative-thinking/18906/13 "2012-11-15T04:30:05Z")

</div>

> [@desjardins2012](#):
>
> I dunno ☹

Did you see my example? My code is using jQuery so you must include the library.

```auto
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
```
