Skip to content

Instantly share code, notes, and snippets.

@brunocalderon
Last active July 2, 2018 18:30
Show Gist options
  • Save brunocalderon/a44fdecb313a04adb4e7f2efe1603faa to your computer and use it in GitHub Desktop.
Save brunocalderon/a44fdecb313a04adb4e7f2efe1603faa to your computer and use it in GitHub Desktop.
Formula para detectar clientes cacho
<?php
$everything_is_easy = $_GET['everything_is_easy'];
$future_work_promises = $_GET['future_work_promises'];
$unrealistic_deadline = $_GET['unrealistic_deadline'];
$questioning_rates = $_GET['questioning_rates'];
$changed_agency = $_GET['changed_agency'];
$you_dont_get_it = $_GET['you_dont_get_it'];
$dissapearing = $_GET['dissapearing'];
$free_proofs = $_GET['free_proofs'];
$disorganized = $_GET['disorganized'];
$gut = $_GET['gut'];
$calculated_score = 0;
// eval
switch ($everything_is_easy) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($future_work_promises) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($unrealistic_deadline) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($questioning_rates) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($changed_agency) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($you_dont_get_it) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($dissapearing) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($free_proofs) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($disorganized) {
case 'true':
$calculated_score = $calculated_score+2;
break;
case 'false':
$calculated_score = $calculated_score-1;
break;
}
switch ($gut) {
case 'dont-take-this-client':
$calculated_score = $calculated_score+2;
break;
case 'take-this-client':
$calculated_score = $calculated_score-1;
break;
}
if ($calculated_score > 9) {
echo "No se te ocurra";
}
elseif ($calculated_score > 6) {
echo "Cliente cacho garantizado";
}
elseif ($calculated_score > 6) {
echo "Muy probablemente un cliente cacho";
}
elseif ($calculated_score > 3) {
echo "Probablemente un cliente cacho";
}
else {
echo "Puedes tomar este cliente";
}
echo "\n";
echo "Puntaje Cacho:".$calculated_score;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment