Skip to content

Commit 95dbad8

Browse files
committed
Processes added
Files added to put custom processes into, including events for: load, login fail, login, logout and new user
1 parent 5576c9e commit 95dbad8

5 files changed

Lines changed: 41 additions & 0 deletions

File tree

processes/on-load.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!--
2+
Purpose: This file is run when ICEcoder has loaded
3+
Langs: Anything - PHP, JS etc
4+
Example:
5+
//-->
6+
<script>
7+
// top.ICEcoder.openFile('/index.html');
8+
// alert('Thanks for using ICEcoder');
9+
</script>

processes/on-user-login-fail.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
// Purpose: This file is run when a login fail occurs
3+
// Langs: PHP only
4+
// Example:
5+
// $fh = fopen(dirname(__FILE__)."/../user-access.log", 'a');
6+
// fwrite($fh, "FAIL ".date("D dS M Y h:i:sa").": ".$_POST['username']."\n");
7+
// fclose($fh);
8+
?>

processes/on-user-login.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
// Purpose: This file is run when a user logs in
3+
// Langs: PHP only
4+
// Example:
5+
// $fh = fopen(dirname(__FILE__)."/../user-access.log", 'a');
6+
// fwrite($fh, "login ".date("D dS M Y h:i:sa").": ".$_SESSION['username']."\n");
7+
// fclose($fh);
8+
?>

processes/on-user-logout.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
// Purpose: This file is run when a user logs out
3+
// Langs: PHP only
4+
// Example:
5+
// $fh = fopen(dirname(__FILE__)."/../user-access.log", 'a');
6+
// fwrite($fh, "logout ".date("D dS M Y h:i:sa").": ".$_SESSION['username']."\n");
7+
// fclose($fh);
8+
?>

processes/on-user-new.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
// Purpose: This file is run when a new user sets up
3+
// Langs: PHP only
4+
// Example:
5+
// $fh = fopen(dirname(__FILE__)."/../user-access.log", 'a');
6+
// fwrite($fh, "NEW >>> ".date("D dS M Y h:i:sa").": ".$_SESSION['username']."\n");
7+
// fclose($fh);
8+
?>

0 commit comments

Comments
 (0)