Bonjour à tous!!
Je voulais savoir si c'était possible de créer un site (avec html et php) où on peut installer des logiciels silencieusement et rapidement. (un peu comme Ninite) si oui, comment on fait pour installer?
j'aimerai que mon site a:
-plusieurs checkbox (qui indique les noms de logiciel)
-un bouton "installer
-Quand je coche les cases des logiciels n°1, n°5, N°3 et que je clic sur le bouton « Installer », cela doit lancer les scripts des logiciels correspondants
voila ce que j'ai fais pour le moment en html(avec du javascript a l'intérieur):
<html>
<head>
<meta charset="UTF-8">
<title>Logiciel à installer</title>
<link rel="stylesheet" href="css1.css">
<script src="javascript1.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10831845-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="header">
<div class="container_12">
<div class="grid_6">
<a class="brand" href="/">Installation de logiciel</a>
</div>
<div class="grid_6 right">
<a href="/help/">Bienvenue</a>
</div>
</div>
</div>
<style>
body {
background: #fff;
overflow-x: hidden;
}
#content {
display: none;
}
.home_heading {
margin-bottom: 4px;
}
.app_category, .app_name {
list-style-type: none;
}
.app_category_list, .app_name_list {
padding: 0;
margin: 0;
}
.app_category_list {
margin: 0 auto;
}
.app_category {
width: 145px;
margin-right: 2px;
float: left;
}
.app_category_name {
margin: 16px 0 0;
}
.app_name {
margin: 2px 0 0;
cursor: pointer;
}
.app_name .icn16 {
display: inline-block;
height: 16px;
width: auto;
padding-left: 17px;
}
.app_name:hover {
background: #FF9933;
}
.selected_app {
background: #5CE673;
}
.selected_app:hover {
background: #52CC66;
}
.get_installer_button {
margin: 16px 0;
}
.ninite_opinions {
margin: 0;
padding: 0;
}
.ninite_opinions li {
margin-top: 5px;
}
.homepage_explanation {
border-bottom: none;
}
.homepage_instructions {
margin: 10px auto;
}
.homepage_info {
margin-top: 50px;
}
/* masonry transitions */
.masonry, .masonry .masonry-brick {
-webkit-transition-duration: 0.7s;
-moz-transition-duration: 0.7s;
-ms-transition-duration: 0.7s;
-o-transition-duration: 0.7s;
transition-duration: 0.7s;
}
.masonry {
-webkit-transition-property: height, width;
-moz-transition-property: height, width;
-ms-transition-property: height, width;
-o-transition-property: height, width;
transition-property: height, width;
}
.masonry .masonry-brick {
-webkit-transition-property: left, right, top;
-moz-transition-property: left, right, top;
-ms-transition-property: left, right, top;
-o-transition-property: left, right, top;
transition-property: left, right, top;
}
</style>
<div class="container_12 homepage_instructions">
<div class="grid_4">
<h2 class="home_heading">1. Cliquer sur les logiciels que vous voulez installer sur le PC</h2>
Vous pouvez en apprendre plus sur un programme en le selectionnant et en cliquant sur le bouton "Documentation".
</div>
<div class="grid_4">
<h2 class="home_heading">2. Cliquer sur le Bouton "Installer</h2>
Ce site installe les logiciels tout seul.
Pas besoin de cliquer sur Suivant.
</div>
<div class="grid_4">
<h2 class="home_heading">3. Exécutez à nouveau plus tard</h2>
Votre installation se mettra à jour, les applications, si il existe des version plus recente.
</div>
</div>
<form method="POST" name="form">
<input type="hidden" name="_xsrf" value="2d12e54593d44e258c91b2ac02887c6b"/>
<ul class="app_category_list">
<li class="app_category">
<h3 class="app_category_name">Sécurité</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="check[]" type="checkbox" id="cb_tm27m" value="Norton Antivirus">
<label class="icn16 icn16_tm27m" for="cb_tm27m">Norton Antivirus</label><br>
</li>
<li class="app_name">
<input name="check[]" type="checkbox" id="cb_7zkz5" value="Corbian Backup">
<label class="icn16 icn16_7zkz5" for="cb_7zkz5">Corbian Backup</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Système</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="check[]" type="checkbox" id="cb_2xqhb" value="CCleaner">
<label class="icn16 icn16_2xqhb" for="cb_2xqhb"> CCleaner</label> <br>
</li>
<li class="app_name">
<input name="chk4" type="checkbox" id="cb_hmql7" value="Dial A Fix">
<label class="icn16 icn16_hmql7" for="cb_hmql7">Dial A Fix</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Réseaux</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk5" type="checkbox" id="cb_aqpqb" value="IP Scan">
<label class="icn16 icn16_aqpqb" for="cb_aqpqb"> IP Scan</label> <br>
</li>
<li class="app_name">
<input name="chk6" type="checkbox" id="cb_zh2ch" value="Magic IP">
<label class="icn16 icn16_zh2ch" for="cb_zh2ch">Magic IP</label> <br>
</li>
<li class="app_name">
<input name="chk7" type="checkbox" id="cb_a3cu2" value="Mozilla Firefox">
<label class="icn16 icn16_a3cu2" for="cb_a3cu2">Magic IP</label> <br>
</li>
<li class="app_name">
<input name="chk8" type="checkbox" id="cb_5gruy" value="NX">
<label class="icn16 icn16_5gruy" for="cb_5gruy">NX</label> <br>
</li>
<li class="app_name">
<input name="chk9" type="checkbox" id="cb_mcak4" value="Putty SSH">
<label class="icn16 icn16_mcak4" for="cb_mcak4">Putty SSH</label> <br>
</li>
<li class="app_name">
<input name="chk10" type="checkbox" id="cb_lpcec" value="Super Scan">
<label class="icn16 icn16_lpcec" for="cb_lpcec">Super Scan</label> <br>
</li>
<li class="app_name">
<input name="chk11" type="checkbox" id="cb_zfkkr" value="Thunderbird">
<label class="icn16 icn16_zfkkr" for="cb_zfkkr">Thunderbird</label> <br>
</li>
<li class="app_name">
<input name="chk12" type="checkbox" id="cb_mamqz" value="TightVNC">
<label class="icn16 icn16_mamqz" for="cb_mamqz">TightVNC</label> <br>
</li>
<li class="app_name">
<input name="chk13" type="checkbox" id="cb_rci2j" value="Ultr@VNC">
<label class="icn16 icn16_rci2j" for="cb_rci2j">Ultr@VNC</label> <br>
</li>
<li class="app_name">
<input name="chk14" type="checkbox" id="cb_sutoa" value="Win2000 Plain">
<label class="icn16 icn16_sutoa" for="cb_sutoa">Win2000 Plain</label> <br>
</li>
<li class="app_name">
<input name="chk15" type="checkbox" id="cb_7ab6r" value="Wireshark">
<label class="icn16 icn16_7ab6r" for="cb_7ab6r">Wireshark</label> <br>
</li>
<li class="app_name">
<input name="chk16" type="checkbox" id="cb_luue2" value="XMing">
<label class="icn16 icn16_luue2" for="cb_luue2">XMing</label> <br>
</li>
<li class="app_name">
<input name="chk17" type="checkbox" id="cb_57ao2" value="XMing Fonts">
<label class="icn16 icn16_57ao2" for="cb_57ao2">XMing Fonts</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Multimédia</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk18" type="checkbox" id="cb_uriix" value="Avelcon2">
<label class="icn16 icn16_uriix" for="cb_uriix"> Avelcon2</label> <br>
</li>
<li class="app_name">
<input name="chk19" type="checkbox" id="cb_2qq4h" value="Camstudio">
<label class="icn16 icn16_2qq4h" for="cb_2qq4h">Camstudio</label> <br>
</li>
<li class="app_name">
<input name="chk20" type="checkbox" id="cb_y4mzj" value="Codec Camstudio">
<label class="icn16 icn16_y4mzj" for="cb_y4mzj">Codec Camstudio</label> <br>
</li>
<li class="app_name">
<input name="chk21" type="checkbox" id="cb_sjzn2" value="Flash IE">
<label class="icn16 icn16_sjzn2" for="cb_sjzn2">Flash IE</label> <br>
</li>
<li class="app_name">
<input name="chk22" type="checkbox" id="cb_tlvlq" value="Flash Mozilla">
<label class="icn16 icn16_tlvlq" for="cb_tlvlq">Flash Mozilla</label> <br>
</li>
<li class="app_name">
<input name="chk23" type="checkbox" id="cb_cz3j7" value="Java">
<label class="icn16 icn16_cz3j7" for="cb_cz3j7">Java</label> <br>
</li>
<li class="app_name">
<input name="chk24" type="checkbox" id="cb_fflxm" value="Photofiltre">
<label class="icn16 icn16_fflxm" for="cb_fflxm">Photofiltre</label> <br>
</li>
<li class="app_name">
<input name="chk25" type="checkbox" id="cb_oxxml" value="The Gimp">
<label class="icn16 icn16_oxxml" for="cb_oxxml">The Gimp</label> <br>
</li>
<li class="app_name">
<input name="chk26" type="checkbox" id="cb_rm6zf" value="VLC">
<label class="icn16 icn16_rm6zf" for="cb_rm6zf">VLC</label> <br>
</li>
<li class="app_name">
<input name="chk27" type="checkbox" id="cb_m4qxn" value="VSO Image">
<label class="icn16 icn16_m4qxn" for="cb_m4qxn">VSO Image</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Manipulation de fichiers</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk28" type="checkbox" id="cb_epxow" value="Full Sync">
<label class="icn16 icn16_epxow" for="cb_epxow"> Full Sync</label> <br>
</li>
<li class="app_name">
<input name="chk29" type="checkbox" id="cb_dmzdc" value="Super Copier">
<label class="icn16 icn16_dmzdc" for="cb_dmzdc"> Super Copier</label> <br>
</li>
<li class="app_name">
<input name="chk30" type="checkbox" id="cb_ibqtw" value="Lupas Rename">
<label class="icn16 icn16_ibqtw" for="cb_ibqtw"> Lupas Rename</label> <br>
</li>
<li class="app_name">
<input name="chk31" type="checkbox" id="cb_pa3mm" value="PC Inspector File">
<label class="icn16 icn16_pa3mm" for="cb_pa3mm"> PC Inspector File</label> <br>
</li>
<li class="app_name">
<input name="chk32" type="checkbox" id="cb_jwrto" value="Rep Listing">
<label class="icn16 icn16_jwrto" for="cb_jwrto"> Rep Listing</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Scientifique</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk33" type="checkbox" id="cb_itstl" value="R">
<label class="icn16 icn16_itstl" for="cb_itstl"> R</label> <br>
</li>
<li class="app_name">
<input name="chk34" type="checkbox" id="cb_4nn6w" value="Scilab">
<label class="icn16 icn16_4nn6w" for="cb_4nn6w"> Scilab</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Programmation</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk35" type="checkbox" id="cb_nmyd5" value="Autoit">
<label class="icn16 icn16_nmyd5" for="cb_nmyd5"> Autoit</label> <br>
</li>
<li class="app_name">
<input name="chk36" type="checkbox" id="cb_ahpot" value="Notepad">
<label class="icn16 icn16_ahpot" for="cb_ahpot"> Notepad</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Bureautique</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk37" type="checkbox" id="cb_dxu3b" value="Foxit Reader">
<label class="icn16 icn16_dxu3b" for="cb_dxu3b"> Foxit Reader</label> <br>
</li>
<li class="app_name">
<input name="chk38" type="checkbox" id="cb_tvalh" value="Open Office">
<label class="icn16 icn16_tvalh" for="cb_tvalh"> Open Office</label> <br>
</li>
<li class="app_name">
<input name="chk39" type="checkbox" id="cb_62sme" value="PDF Creator">
<label class="icn16 icn16_62sme" for="cb_62sme"> PDF Creator</label> <br>
</li>
<li class="app_name">
<input name="chk40" type="checkbox" id="cb_kr3jn" value="Tex Maker">
<label class="icn16 icn16_kr3jn" for="cb_kr3jn"> Tex Maker</label> <br>
</li>
</ul>
</li>
<li class="app_category">
<h3 class="app_category_name">Utilitaire</h3>
<ul class="app_name_list">
<li class="app_name">
<input name="chk41" type="checkbox" id="cb_q3z5u" value="7zip">
<label class="icn16 icn16_q3z5u" for="cb_q3z5u"> 7zip</label> <br>
</li>
</ul>
</li>
</ul>
<br>
<div class="container_12">
<div class="grid_12 center">
<p class="please_select_apps error" style="display: none;">
Select the apps you want by clicking on them above.
</p>
<button class="get_installer_button" type="button" name="documentation" accesskey="h">Documentation</button>
<button class="get_installer_button" type="submit" name="installer" accesskey="g" onclick="mafunction()">Installer</button> <br>
<input type="checkbox" onclick="CheckAll()">Cocher/décocher <br>
</div>
</div>
</form>
<script src="javascript2.js"></script>
<script src="javascript3.js"></script>
<?php
function checkAll(){
var coche = document.form.coche;
var check = document.form.elements["check[]"];
if(check != null)
{
if( coche.checked == true)
{
for( var i = 0 ; i < check.length ; i++)
{
check[i].checked = true;
var tmp = 1;
}
}
}
}
?>
<script>
$(function(){
$('.app_category_list').masonry({
itemSelector: '.app_category',
isFitWidth: true
});
});
$('.get_installer_button').click(function(e) {
if ($('input[name=apps]:checked').size() === 0) {
$('.please_select_apps').slideDown();
return false;
}
});
function set_checked_class(el) {
if (el.find("input:checkbox").prop("checked")) {
el.addClass("selected_app");
} else {
el.removeClass("selected_app");
}
}
function setall(cl, v) {
$("."+cl+" input").prop("checked", v);
$(".app_name").each(function(){ set_checked_class($(this)); });
return false;
}
$(document).ready(function() {
$(".app_name").each(function(){ set_checked_class($(this)); });
});
$(".app_name").click(function(e){
var ck = $("input:checkbox", this).prop("checked");
if (e.target.tagName != 'INPUT')
$("input:checkbox", this).prop("checked", !ck);
set_checked_class($(this));
});
$(".app_name label").click(function(e){
e.preventDefault();
});
function getCookie(name) {
var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");
return r ? r[1] : undefined;
}
$("form#suggest").submit(function(e){
e.preventDefault();
var data = { name: $("#suggestname").val(),
email: $("#suggestemail").val(),
_xsrf: getCookie("_xsrf") };
$.post("/suggest", data, function(){
$("#suggestthanks").fadeIn().delay(2000).fadeOut("slow");
});
$("#suggestname").val("");
});
</script>
</body>
</html>
Merci!!
Afficher la suite
24 juin 2014 à 15:59
Pourtant il y a des sites du genre, Ninite qui existe.
24 juin 2014 à 16:10
Ninite n'installe rien silencieusement.
Tu coche tes logiciels, ninite fabrique l'installeur correspondant, tu télécharges cet installeur qui lui installera les logiciels en question.
Tu ne peut lancer une installation sans passer par la case installeur depuis le web.
Donc la, il va falloir plus que du php.
25 juin 2014 à 10:40
A moins que vous avez peut-étre raison.
25 juin 2014 à 10:42
25 juin 2014 à 10:45