Try to search in files: (
upload.php)
and change to
PHP:
json_encode(htmlspecialchars($result, ENT_QUOTES, 'UTF-8'));
Required later:
Rich (BB code):
You need to look in all files for http:// addresses of individual API providers and change them to https://.
For "mobile" version, u should update few libraries, angularjs and ionic. This mobile app is suitable for WebView max anyway: (all either on google or on github)
- update ionic to 1.3.5 (from 1.3.2)
- update angularjs to 1.8.2 (from 1.5.3)
- update angular-ui-router to 0.4.3 (from 0.2.11/0.2.13)
- update jquery to 3.6.0 (from 2.1.1)
- update pusher to 4.4.0 (from 4.0.0)
- update popper to 1.16.0
- update ng-flow to 2.7.7 (from 2.5.1)
- update hammer.js to 2.0.9 (from 2.0.8)
- update ng-cordova-oauth to 0.3.0
- update ionicons to 6.0.1 (from 2.0.1)
- update gsap to 2.1.3 (from 1.11.8/2.0.0)
- etc...etc...
Would be grate to add your own
manifest.json and
service-worker.js for being more PWA. (/web.dev/learn/pwa/ and pwabuilder.com)
After updating the libraries and js files, you can minify them to make them run faster. Ex. minify-js.com.
Mobile app.js file is missing some basic settings. Check ionic1.x forum.
The latest version of Ionic/angularjs will be available in multiple js files, not in a bundle as before. Therefore, you need to change: (
mobile/index.php)
HTML:
<script src="lib/ionic/js/ionic.bundle.js"></script>
to:
HTML:
<script src="lib/ionic/js/ionic.min.js"></script>
<script src="lib/ionic/js/ionic-angular.min.js"></script>
<script src="lib/angular/angular.min.js"></script>
<script src="lib/angular-sanitize/angular-sanitize.min.js"></script>
<script src="lib/angular-ui-router/release/angular-ui-router.min.js"></script>
<script src="lib/angular/angular-resource.min.js"></script>
Find: (to fix weird problems in ios<=15)
HTML:
<body ng-app="starter" ng-controller="AppCtrl" style="background: #fff;">
remove:
HTML:
style="background: #fff;"
Find:
HTML:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi">
<title></title>
change to:
HTML:
<head>
<meta charset="utf-8">
<base href="/mobile/" />
<link href="//connect.facebook.net" rel="dns-prefetch" crossorigin />
<link href="//connect.facebook.net" rel="preconnect" crossorigin />
<link href="//facebook.com" rel="dns-prefetch" crossorigin />
<link href="//facebook.com" rel="preconnect" crossorigin />
<title><?= $sm['seoLang']['landing'][1]['text']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="apple-mobile-web-app-title" content="<App name>" />
<meta name="apple-mobile-web-app-status-bar" content="#YOUR_COLOR" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="description" content="<?= $sm['config']['description']; ?>" />
<meta name="author" content="<App name>, [email protected]" />
<meta name="rating" content="adult" />
<meta name="full-screen" content="yes" />
<meta name="format-detection" content="telephone=no" />
<meta name="theme-color" content="#592BCA" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="<App name>" />
<meta name="msapplication-TileColor" content="#9c27b0" />
<meta name="msapplication-tooltip" content="<?= $sm['config']['description']; ?>" />
<meta name="google" content="notranslate" />
<meta property="fb:app_id" content="<FB_APP_ID_FOR_LOGON_AS_FB>" />
<meta property="og:site_name" content="<App name>" />
<meta property="og:title" content="<?= $sm['config']['title']; ?>" />
<meta property="og:url" content="<?= $sm['config']['site_url']; ?>" />
<meta property="og:image" content="<?= $sm['config']['logo']; ?>" />
<meta property="og:description" content="<?= $sm['config']['description']; ?>" />
<meta property="og:type" content="website" />
<meta property="og:email" content="[email protected]" />
<meta name="twitter:card" content="app" />
<meta name="twitter:site" content="@<Twitter_profile>" />
<meta name="twitter:app:id:googleplay" content="<Google_Play_App_ID>" />
<meta name="twitter:app:name:googleplay" content="Darln" />
<meta name="twitter:title" content="<App name>" />
<meta name="twitter:description" content="<?= $sm['config']['description']; ?>" />
<link rel="canonical" href="https://localhost/mobile/" />
<link rel="icon" href="https://localhost/favicon.ico" sizes="64x64" />
<link rel="manifest" href="https://localhost/mobile/manifest.json" />
<link rel="mask-icon" href="https://localhost/safari-pinned-tab.svg" color="#592bca" />
<link rel="apple-touch-icon" sizes="180x180" href="https://localhost/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="https://localhost/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="https://localhost/favicon-16x16.png" />
<link href="img/splashscreens/iphone5_splash.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/iphone6_splash.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/iphoneplus_splash.png" media="(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/iphonex_splash.png" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/iphonexr_splash.png" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/iphonexsmax_splash.png" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/ipad_splash.png" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/ipadpro1_splash.png" media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/ipadpro3_splash.png" media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
<link href="img/splashscreens/ipadpro2_splash.png" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image" />
Open
mobile/js/app.js and find:
JavaScript:
.config(function($ionicConfigProvider) {
$ionicConfigProvider.views.transition('none');
$ionicConfigProvider.navBar.alignTitle('center');
$ionicConfigProvider.views.swipeBackEnabled(true);
$ionicConfigProvider.views.maxCache(0);
$ionicConfigProvider.tabs.position('bottom');
})
change to better view:
JavaScript:
.config(function($ionicConfigProvider) {
$ionicConfigProvider.views.transition('none');
$ionicConfigProvider.navBar.alignTitle('center');
$ionicConfigProvider.views.swipeBackEnabled(false);
$ionicConfigProvider.views.forwardCache(true);
$ionicConfigProvider.tabs.position('bottom');
$ionicConfigProvider.scrolling.jsScrolling(false);
})
find:
JavaScript:
.state('home.messaging', {
url: '/messaging',
templateUrl: 'templates/'+mobileTheme+'/home/messaging.html',
controller: 'MessagingCtrl'
})
Add below:
JavaScript:
$locationProvider.html5Mode(true);
Open
mobile/js/services.js and find api Key for Gifs:
JavaScript:
var API_KEY = 'dc6zaTOxFJmzC';
change to: (get api key here: developers.giphy.com)
JavaScript:
var API_KEY = '<your_api_key>';
find:
JavaScript:
var ENDPOINT = 'http://api.giphy.com/v1/gifs/';
and change http to
https.
Now find there:
JavaScript:
return $http.get(ENDPOINT + 'search', {params: {
q: query,
and above add limit:
Uploaded image files have their original names or an easy-to-guess name. So we look in
assets/sources/upload.php:
PHP:
$file_name = trim(basename(stripslashes($_FILES['file']['name'])), ".\x00..\x20");
$file_name = str_replace(" ", "", $file_name);
$file_name = str_replace("(", "", $file_name);
$file_name = str_replace(")", "", $file_name);
change to:
PHP:
$read_ext = explode('.', $_FILES['file']['name']);
$file_ext = end($read_ext);
$file_name = $_FILES['file']['size'] . '_' . uniqid() . '.' . $file_ext;
Open
/administrator/assets/js/admin.js and find:
JavaScript:
if(c.softwareVersion > sVersion){
$('[data-main-dashboard]').prepend(`<div class="alert alert-soft-success alert-dismissible d-flex align-items-center card-margin" style="cursor: pointer;" onclick="goTo('update')" data-update-software-main-dashboard>
<i class="material-icons mr-3">update</i>
<div class="text-body">Software update available<br>Update to version `+c.softwareVersion+`<br><strong>Click here for <a href="#">update the software</a></strong></div>
</div>`);
}
now, remove this.
In other php files u could change:
PHP:
if (mysqli_connect_errno()) {
exit(mysqli_connect_error());
}
to:
PHP:
if (mysqli_connect_errno()) {
error_log(mysqli_connect_error(), 0);
exit('Database connection failed.');
}
By the way, there is a more interesting thing in the api.php file. It causes that when, for example, you set the password for the account “Babiato1!” then when I typed “Babi” or “Babia” and try to log in, the application logged in correctly. I didn't test it much and just changed a few lines of code right away. But for sure the password verification works incorrectly.
In
api.php of corse find:
PHP:
$userApi = 'https://www.belloo.date/clients/users.php?';
and change to
$userApi = '';
find:
PHP:
$password = secureEncode($_GET['login_pass']);
change to:
PHP:
$password = md5($_GET['login_pass']);
find:
PHP:
$email_check = $mysqli->query("SELECT email,id,pass,verified,name,imported FROM users WHERE email = '".$email."'");
change to:
PHP:
$email_check = $mysqli->query("SELECT email,id,password,verified,name,imported FROM users WHERE email = '".$email."'");
find:
PHP:
$pass = $email_check->fetch_object();
if($pass->imported == 'quickdate'){
$checkPassword = password_verify($password,$pass->pass);
change to:
PHP:
$pass = $email_check->fetch_object();
if($pass->imported == 'quickdate') {
$checkPassword = password_verify($password,$pass->password);
find:
PHP:
if(crypt($password, $pass->pass) == $pass->pass) {
change to:
PHP:
if($password == $pass->password) {
find:
PHP:
case 'register':
$email = secureEncode($_GET['reg_email']);
$password = secureEncode($_GET['reg_pass']);
change to:
PHP:
case 'register':
$email = secureEncode($_GET['reg_email']);
$password = md5($_GET['reg_pass']);
add space in:
PHP:
"last_m" => $sm['profile']['city'].','.$sm['profile']['country'],
like this:
PHP:
"last_m" => $sm['profile']['city'].', '.$sm['profile']['country'],
In mobile controllers.js, probably in:
JavaScript:
lang = $localstorage.getObject('lang');
$scope.lang = [];
angular.forEach(alang,function(entry) {
$scope.lang.push({
id: entry,
text: entry.text
});
})
$ionicSideMenuDelegate.toggleLeft();
third line should be:
JavaScript:
angular.forEach(lang,function(entry) {
find few times:
JavaScript:
if(rt == ''){
rt = new Pusher(plugins['pusher']['key'], {
change to:
JavaScript:
if(rt == ''){
rt = new Pusher(plugins['pusher']['key'], {
encrypted: true,
find:
JavaScript:
var gifts = $localstorage.getObject('gifts');
alang = $localstorage.getObject('alang');
change to:
JavaScript:
var gifts = $localstorage.getObject('gifts');
lang = $localstorage.getObject('lang');
alang = $localstorage.getObject('alang');
pusher.php from attachment save to
\assets\includes
Its updated version from 2.6.3 to 2.6.4