$sp = explode("/",$_GET["p"]);
$p = $sp[0];
}
- if ($p == "rendezvous") && (count($sp) == 2){
+ if (($p == "rendezvous") && (count($sp) == 2)){
//TODO: get id by ident name
// $userident = $db->dbquery("select id from users where ident=");
// if ($userident){
save_rendezvous($pdt);
break;
case 'submit_profile':
- if (!isset($pdt["uservisibility"])) { $pdt["uservisibility"] = "";}
+ //if (!isset($pdt["uservisibility"])) { $pdt["uservisibility"] = "";}
save_data('users',$pdt);
break;
// case 'submit_profileetude':
function activate_evaluation($gdt){
global $db,$user,$msg;
- $sql = "select us.service,us.expiration,us.payeddate,us.isevaluation,apps.name from userservices us join apps on (us.id_app=apps.id) where us.id_app='".$gdt["id"]."' and us.id_user=".$user["id"].";";
+ $sql = "select us.service,us.expiration,us.payeddate,us.isevaluation,apps.name from userservices us join apps on (us.id_app=apps.id) where us.id_app='".$gdt["app"]."' and us.id_user=".$user["id"].";";
$eval = $db->dbquery($sql);
if ($eval){
- $msg = '<div class=\"alert alert-danger">Vous avez déjà testé le service '.$eval["name"].'</div>';
+ $msg = '<div class="alert alert-danger">Vous avez déjà testé le service '.$eval["name"].'</div>';
} else {
- $sql = "select id,app,name,evaluationdays from apps where id=".$gdt["id"];
+ $sql = "select id,app,name,evaluationdays from apps where id=".$gdt["app"];
$eapp = $db->dbquery($sql);
if ($eapp["evaluationdays"] == null){
- $msg = '<div class=\"alert alert-danger">Cette Application n\'a pas une periode d\'évaluation</div>';
+ $msg = '<div class="alert alert-danger">Cette Application n\'a pas une periode d\'évaluation</div>';
}else {
$evaldate = date('Y-m-d',strtotime("+".$eapp["evaluationdays"]." days"));
$evaldateshow = date('d.m.Y',strtotime("+".$eapp["evaluationdays"]." days"));
- $sql = "INSERT INTO userservices (id_user,service,expiration,isevaluation,id_app) VALUES (".$user["id"].",".$eapp["app"].",date('".$evaldate."'),1,".$gdt["id"].")";
+ $sql = "INSERT INTO userservices (id_user,service,expiration,isevaluation,id_app) VALUES (".$user["id"].",'".$eapp["app"]."',date('".$evaldate."'),1,".$eapp["id"].")";
$db->dbexec($sql);
- $msg = '<div class=\"alert alert-success">Periode d\'évaluation a été activé jusqu\'au '.$evaldateshow.'</div>';
+ $msg = '<div class="alert alert-success">Periode d\'évaluation a été activé jusqu\'au '.$evaldateshow.'</div>';
}
}
}
}
+
+ function crypt_mailaddress($mailadr){
+ $n = 0;
+ $r = "";
+ $mailadr = 'mailto:'.$mailadr;
+ $xdata = str_split($mailadr);
+ for($i=0; $i < count($xdata); $i++ ){
+ $n = ord( $xdata[$i] );
+ if( $n >= 8364 ){$n = 128;}
+ $r .= chr($n+1);
+ }
+ return $r;
+ }
?>
\ No newline at end of file
});
}
+}
+
+function imsg(data){
+ var tmp = h1(data);
+ console.log(tmp);
+ window.location.href=tmp;
+}
+
+function h1(s) {
+ var n = 0;
+ var r = "";
+ for( var i = 0; i < s.length; i++){
+ n = s.charCodeAt( i );
+ if( n >= 8364 ){n = 128;}
+ r += String.fromCharCode( n - 1 );
+ }
+ return r;
}
\ No newline at end of file
echo '<div>'.(($avo['userzip'] != "")?$avo['userzip']:'').' '.(($avo['usercity'] != "")?$avo['usercity']:'').'</div>';
}
if ($avo['userphone'] != ''){
- echo '<div><i class="fas fa-phone"></i>: <a a href="tel://'.$avo['userphone'].'">'.$avo['userphone'].'</a></div>';
+ echo '<div><i class="fas fa-phone"></i>: <a href="tel://'.$avo['userphone'].'">'.$avo['userphone'].'</a></div>';
}
if ($avo['useremail']){
- echo '<i class="fas fa-at"></i>: <a a href="mailto://'.$avo['useremail'].'">'.$avo['useremail'].'</a>';
+ echo '<i class="fas fa-at"></i>: <button class="btn btn-default" onclick="imsg(\''.crypt_mailaddress($avo['useremail']).'\');">'.str_replace('@',' [ at ] ',$avo['useremail']).'</button>';
}
echo '</div>';
}
-<link href="<?php echo $baseurl; ?>/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-<link href="<?php echo $baseurl; ?>/vendor/juridig.epic.css" rel="stylesheet">
-<link href="<?php echo $baseurl; ?>/vendor/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
-<link href="<?php echo $baseurl; ?>/vendor/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">
-<link href="<?php echo $baseurl; ?>/vendor/bootstrap4-tagsinput/tagsinput.css" rel="stylesheet">
-<link href="<?php echo $baseurl; ?>/vendor/fontawesome/css/all.min.css" rel="stylesheet">
+<link href="<?php echo $baseurl; ?>/vendor/bootstrap/css/bootstrap.min.css?v=1" rel="stylesheet">
+<link href="<?php echo $baseurl; ?>/vendor/juridig.epic.css?v=1" rel="stylesheet">
+<link href="<?php echo $baseurl; ?>/vendor/bootstrap-table/bootstrap-table.min.css?v=1" rel="stylesheet">
+<link href="<?php echo $baseurl; ?>/vendor/bootstrap-datepicker/css/bootstrap-datepicker.min.css?v=1" rel="stylesheet">
+<link href="<?php echo $baseurl; ?>/vendor/bootstrap4-tagsinput/tagsinput.css?v=1" rel="stylesheet">
+<link href="<?php echo $baseurl; ?>/vendor/fontawesome/css/all.min.css?v=1" rel="stylesheet">
-<link href="<?php echo $baseurl; ?>/style.css" rel="stylesheet">
\ No newline at end of file
+<link href="<?php echo $baseurl; ?>/style.css?v=1" rel="stylesheet">
\ No newline at end of file
<script src="<?php echo $baseurl; ?>/vendor/bootstrap4-tagsinput/tagsinput.js"></script>
<script src="<?php echo $baseurl; ?>/vendor/twbs-toggle-buttons/jquery.twbs-toggle-buttons.min.js"></script>
<script src="<?php echo $baseurl; ?>/vendor/tinymce/js/tinymce/tinymce.min.js"></script>
-<script src="<?php echo $baseurl; ?>/site.js"></script>
\ No newline at end of file
+<script src="<?php echo $baseurl; ?>/site.js?v=2"></script>
\ No newline at end of file
<h5 class="card-title text-muted text-uppercase text-center">Evaluation</h5>
<h6 class="card-price text-center"><?php echo $userapps["0"]["evaluationdays"]; ?> jours gratuit</span></h6>
<hr>
- <a href="<?php echo $baseurl.'/profile/application?app='.$_GET["id"]."&activate=evaluation" ?>" class="btn btn-block btn-primary text-uppercase">Activer</a>
+ <a href="<?php echo $baseurl.'/profile/applications?app='.$_GET["id"]."&activate=evaluation" ?>" class="btn btn-block btn-primary text-uppercase">Activer</a>
</div>
</div>
</div>