This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('select_projects.php'); | |
$projects=utf8_encode($option2); | |
$host="localhost"; | |
$user="root"; | |
$pass=""; | |
$db="calendar"; | |
$name=$_POST['stat']; | |
$connect=mysqli_connect($host,$user,$pass,$db); | |
$query = "SELECT status, count(*) as number FROM taches WHERE projets='$name' GROUP BY status"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('select_projects.php'); | |
$projects=utf8_encode($option2); | |
$host="localhost"; | |
$user="root"; | |
$pass=""; | |
$db="calendar"; | |
$connect=mysqli_connect($host,$user,$pass,$db); | |
if(isset($_POST['stat'])&&($_POST)){ | |
$name=$_POST['stat']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set your timezone!! | |
$connection = mysql_connect("localhost","root"); | |
mysql_select_db("bd_events") or die("no database"); | |
// Set your timezone!! | |
date_default_timezone_set('Africa/Tunisia'); | |
// Get prev & next month |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_vc_shortcode( $atts ) { | |
global $current_user; | |
get_currentuserinfo(); | |
switch (true) { | |
case ( user_can( $current_user, "7eme") && is_user_logged_in() && function_exists('pmpro_hasMembershipLevel') && @!pmpro_hasMembershipLevel() ): | |
$course_id = learndash_get_course_id( $post_id ); | |
$user = get_current_user_id(); | |
return ld_update_course_access($user, $course_id=111, $remove = false); | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<form action="localhost/change_role_7%C3%A8me.php" method="get"> | |
<input type="submit" name="on" value="on"> | |
<input type="submit" name="off" value="off"> | |
</form> | |
</body> | |
</html> | |
<?php | |
if(isset($_GET['on'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1/write script shell like this | |
#!/bin/bash | |
ERRLOG=/path/wgetcron.log | |
TARGET=http://www.example.org/wp-content/plugins/paid-memberships-pro/scheduled/expirememberships.php | |
UA=WgetCron-ViaPlanficateursTachesOVH | |
wget -nv -U $UA -O /dev/null $TARGET >/dev/null 2>>$ERRLOG | |
2/chmod +x script | |
3/crontab -e and add the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $current_user; | |
get_currentuserinfo(); | |
switch (true) { | |
case ( user_can( $current_user, "subscriber") ): | |
echo '<img src="http:www.impho.com/images/001.jpg">'; | |
break; | |
case ( user_can( $current_user, "contributor") ): | |
echo '<img src="http:www.impho.com/images/002.jpg">'; | |
break; |
NewerOlder